There is no denying that any successful high-quality product must be thoroughly tested throughout its entire build lifecycle. Finding the right way to conduct testing is more of a gray area. With so many tools and processes to choose from, it can be difficult to determine what will work best for your team.
At U.Group, the Engineering Team recently started using TestCafe for our end-to-end user interface (UI) automation—which helped us get the whole team involve in continuous testing. In this post, we’ll dig into the reasons we chose TestCafe out of the plethora of other tools out there, and why you might benefit from using it as well.
Top 6 Perks of TestCafe
When it came time to look for a testing tool, one of the requirements at the top of our list was something with robust features that would be easy to use. TestCafe checked all the boxes. Here are six of the top perks:
TestCafe is easy to set up. Anyone can hit the ground running with writing test scripts in minutes. Better yet, there is no need to install web drivers and additional libraries to get things running.
TestCafe natively detects all browsers running on the machine and provides the ability to run tests on any of them. This feature eliminates the need to manage and maintain web drivers and browser versions. This both saves time and alleviates the burden of automation testers and developers having to write tests. TestCafe runs out of the box in IE as long as IE is installed on the machine.
UI functional tests are not easy to create. You have to pick the exact elements to interact with, run the test multiple times, and make changes until you have a reliable test. This means that whatever tool you use should support good debugging methods. TestCafe has you covered in this department.
It has a debug mode where you can continue execution step-by-step to see what happens at each point of the test. You can also open the developer tools to investigate during the test run. There’s also a live mode where browsers remain active while you work on tests. They’ll automatically rerun once you make code changes.
If you ask any automation engineer or software engineer who has had experience writing UI tests using Selenium, they will tell you how much time they spent carefully placing the right waiting mechanism in place to ensure tests don’t break. TestCafe has mechanisms for automatic waits for actions, selectors, assertions, page loads and redirects. This leads to more reliable tests.
Concurrent test runs
TestCafe gives you the ability to run tests concurrently right out of the box without any configurations. This is extremely important to speed up test runs and set up a fast feedback loop.
Continuous integration pipeline integration
TestCafe integrates easily with CI providers. Since it doesn’t need you to configure any external web drivers or libraries like Selenium does, the only prerequisite is to have the required browsers installed in the CI server.
Implementing TestCafe Into the Team’s Process
In addition to the benefits mentioned above, everyone on the development team can use TestCafe with ease. This enables better collaboration between testers and developers throughout the product development lifecycle. Even the best software can only get you so far, though—your team’s processes should facilitate easy collaboration as well. Here are some examples of how to do that.
Our team agreed that TypeScript was the best language to write clean and maintainable code for our tests. It also happens to be the language we use for the front end. With everyone using the same language, both automated testers and developers can contribute to building and maintaining the automation codebase—which leads to more functional test coverage.
In our team’s case, developers contribute to writing functional UI tests. The simplicity of running and writing tests using TestCafe enables them to do this easily. Thanks to this, our regression test suite is extensive, reliable, and—most importantly—catches bugs as soon as they are introduced. The end-to-end tests run against every commit. This makes it easy to figure out what commit introduces a bug and speeds up our feedback loop.
We use Concourse as our CI pipeline, which is easy to set up to run TestCafe. At first, we had one job running the entire regression suite concurrently. But as the test suite got larger, it took longer to run. That’s when we decided to split up the regression suite into multiple jobs—which was still set up to run concurrently. With this approach, we were able to run a large test suite in a short period of time against every commit.
U.Group’s Experience with TestCafe
TestCafe has made it easier for the whole team to hit the ground running with writing tests. It’s also been a huge time saver. With all its built-in features, TestCafe frees the team up to concentrate on writing automated tests rather than spending time maintaining the framework.
Moreover, running tests concurrently and having multiple jobs running in parallel in our pipeline sped up our feedback loop—which made it easy to point to root causes of bugs and consequently build a high-quality application. For these reasons, we highly recommend looking into how TestCafe can help streamline your team’s testing, too.
Want more engineering and development hacks? Sign up for our newsletter to receive the latest each month.