Using Faker to generate data for your Cypress tests

I’m a man of simple pleasures. Good books to keep the mind active and exposed to fresh ideas. Music that I can enjoy and relax to when needed. And also doing things with as little extra effort then required. Or sometimes referred to as taking the path of the least resistance. Why push a boulder up a hill if you don’t have to?

One of my favourite quotes by Bill Gates touches on this very topic and I think it illustrates perfectly the mindset that I try to apply to my daily life.“I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.”

“I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.”

Bill Gates

Lazy seems to have a negative association in today’s society and coupled often with the image of someone laying in a hammock and snoozing the day away while avoiding more important work.

The word originates from the 1540s word lasey whose original definition was someone that was “verse to labor, action, or effort“. And despite the modern-day connection with the word idle and the associated images that it brings to mind. I’m happy to associate myself with at least part of the original definition.

Because like I say. Why do something the hard way if you don’t need to?

Read More

Making use of custom commands and fixtures to reduce repeated code in your Cypress automation

The array of original web applications released today is outstanding. From blogging platforms, marketing tools and even websites dedicated to sharing photographs of your beloved pet cat. The diversity in the web’s utilisation for users to work, play and get tasks done is huge.

But there’s some functionality that nearly every application out there today has in common with one another. Whether its to keep track of how often you use particular services. Enable the ability to provide a rich and tailored experience. Or just restrict access to allow certain users. The process of registration and logging in is one of the most common tasks that users have to do when they want to interact with a new web application.

And for testers trying to construct an automation framework or toolset. These can be some of the most challenging parts of any automation approach. Not because it’s notoriosly difficult. But more because there are several unique approaches to achieving the desired goal:

  • You could use a static account. Already pre-configured and authenticated.
  • You could create a new account on the fly. Simulating the process of a real user.
  • You could also seed the database with an API POST request. Allowing you to mock login responses and other core functionality.

Each one of these options has their own pros/cons and I would highly suggest taking the time to think about which one not only works for your situation. But which one will provide the most value to the project that you are working on.

Read More

Consider the unconsidered

Our ability to predict human behaviour in various contexts is remarkably accurate. From measuring the likelihood of us buying a certain number of items based on our past shopping history. To whether we might want to go on holiday by analyzing our past Google search results (I’m sure you’ve seen the targeted ads).

And even though we can do amazing things with software and hardware to help us in predicting behaviour. We still run into issues in certain situations.

Think of a scenario in which an automatic car is driving down the road, and we throw an obstacle into its path. Will the car detect what is going on and take corrective action? Or will the car carry-on and cause a potential accident?

The answer is a favourite response of mine: ‘It depends’.

Read More

Automated API Testing with Cypress

Following on from my recent post detailing why you should be focusing on API testing (if you aren’t already). I wanted to show an example of a testing tool that I’m sure many people are interested in using for their automated UI testing needs and detail how to use it to perform automated API testing.

Why use Cypress?

If your tech stack is dependent on JavaScript in the front-end with a framework like React or Vue. And you’re making use of it in the back-end layer with a service like Firebase. Then using a JavaScript end-to-end testing tool might be something that you may want to consider.

New framework
Read More

Testing Can Be A Risky Business

It’s not uncommon for a software development project to take months or even years to be completed and reach the hands of customers. Or with Duke Nukem Forever.. decades.

And yet, with all that development time and anticipation by your end-users to get to use a piece of software. One incorrect feature or obscure bug can render the entire development process to worthless in less than a minute. This can not only be an infuriating experience for everyone involved. It is a perfect example of why an effective and robust testing strategy is not only crucial. But with software or hardware that is dealing with human life. It would be crazy not to have been included.

Read More

Strategic Test Automation

Testing is a critical part of any successful software development life-cycle. With demand ever-increasing for new digital solutions and quicker release cycles needed. The migration of previous manual test cases to an automated process is being put into action by more and more development teams as time goes on. And with amazing tools now available, such as Cypress and TestProject. Making the switch and reaping the rewards that test automation unleashes is simpler than ever.

With many benefits such as increases in efficiency, cost reductions less human interaction. Companies have a lot to gain from adopting robust test automation strategies and if used right. They will gain a valuable addition to their testing arsenal.

Unfortunately, many teams either start off on the wrong footing. Or when they get a new tool and use it. They have failed to have done the essential groundwork needed to know what they will do with it.

Read More

Seven practises to expand your software testing skills

One of my biggest heroes and someone I look up to for inspiration is the marathoner Eliud Kipchoge. Not only is he the holder of the (unofficial) fastest marathon time of under 2hrs (which is insane!) But he is also a prime example of what you can do with a dream, consistent practice and always pushing forward.

I might be guilty of butchering this quote, but to know a man, look at his habits. And if we look at his habits, then we can see a man who does not rest on his laurels and past achievements. But is always putting in the effort to push himself forward. Ready to achieve his next big goal.

For example, prior to marathons, he runs an average of 100+ miles per week. Crazy!

Read More

Why are you testing through the UI?

When asked what they think of when they hear automated testing. I would predict that many people (not all!), will think of a web browser being operated by a robot. Or a tool like Selenium or Cypress that you give instructions to and it navigates the web programmatically.

And while the former part of that statement is (partially) true. The latter is only referring to one type of automated testing and doesn’t cover the entire range of options that the term encompasses.

Testing at the UI level is a perfect option if we want to complete an end-to-end test from the perspective of a user. Confirm if the UI renders correctly under various conditions. Or check for visual inconsistencies without the effort of a human tester.

Read More

Not all bugs are created equal

The bug report is one cornerstone of a software testers work. Not only does it represent the errors or problems we have identified in a piece of software. But for developers on the receiving end of our submissions. They also define a portion of their workload for the day ahead.

It is a tester’s responsibility to report issues and bugs which have a negative on the quality of the product being delivered. But as part of that process. Any reported bug should also receive an associated severity level. This is a measured value which reflects the bug’s impact in the overall application.

To complicate things a little further, each bug also needs its own priority level. Which aims to minimise the impact on the development of a product and those issues with the greatest effect to end users get the required attention.

Read More

Why you should consider TestProject for your next test automation solution

I first discovered TestProject after hearing an interview with Mark Kardashov (CEO & co-founder) on an episode of the TestTalks podcast. For those who are unaware of TestProject. TestProject is a complete automated testing solution that is built ontop of Selenium and Appium.

Allowing it to be used for web-based testing, smart phone applications (iOS/Android), it is also backed by an invaluable community of enthusiastic testers discussing the latest trends and testing news. The community also serves a critical resource for seeking the answer to any questions that you may have about the platform.

TestProject is the brain-child of a team of developers based in the Israeli town of Petah-Tikva. Initially developed in 2015. However, they are now a member of the Tricentis family of software testing products.

I had been working with Selenium for quite a while when I first heard of TestProject. But always being open to widening my knowledge, experience and toolkit. And based on what I heard in the podcast and discovering that TestProject takes advantage of many features of both Selenium and Appium through an extensive SDK. I had to check it out.

(Side note: The SDK previously only supported Java. But it now supports C# and will receive further updates soon to support for additional languages such as JavaScript and Python).

Read More