Start United States USA — software How to Run Parallel Tests With CircleCI

How to Run Parallel Tests With CircleCI

162
0
TEILEN

Learn what parallel testing is and how to run parallel tests with a popular and useful CI/CD tool known as CircleCI.
Join the DZone community and get the full member experience. More often than not, testers have to deal with a large codebase comprising hundreds or even thousands of tests. Most tests validating website or app functionality must be rerun on different platforms (devices, browsers, operating systems). However, running so many tests on different platforms can be immensely difficult, not to mention tedious and error-prone, without the right strategy and tech. The best and easiest way to test under such conditions is to use parallel testing. This article will explore how to run parallel tests with a particularly popular and useful CI/CD tool like CircleCI. In parallel testing, you test different modules or applications on multiple browser-device-OS combinations simultaneously rather than one after another. In a scenario where we have two versions of software available, and both must be examined to ensure stability and compatibility, it is easier to run tests on two versions simultaneously, get results and detect bugs faster Parallel testing reduces execution time and effort, resulting in faster time to delivery. It is particularly useful in the case of cross-browser testing, compatibility testing, localization, and internalization testing. Before exploring parallel testing with CircleCI, it’s important to place a quick note on why it’s important to run parallel tests on real browsers and devices. While it may seem easier to download and test on emulators and simulators, they are riddled with inadequacies that prevent them from providing a reliable test environment. For example, they cannot mimic low network conditions, low battery, or incoming calls. In general, they cannot replicate all features of real browsers and devices, making the results of tests run on them prone to serious error. Now, on to CircleCI. CircleCI provides us with capabilities to run tests in parallel and achieve faster completion. When you run your tests with CircleCI, they usually run on a single VM. Now, the more tests, the more time it will take to complete on one machine. In order to reduce this time, you can run tests in parallel by distributing them across multiple separate executors. In order to do this, you need to specify the parallelism level to define how many separate executors should be spun up for your job.

Continue reading...