Reid  Rohan

Reid Rohan

1619713320

Run Javascript E2E Tests Faster with Cypress on Parallel CI Nodes

Cypress test runner is a great alternative to Selenium in end-to-end testing space. When it comes to E2E tests they tend to grow with time and running them is slow and becomes time wasting or just coffee break for developers. ;)

To save the time and give quick feedback to developers about CI builds passing or not we could run tests across parallel CI nodes. Many  CI providers  allow you to set up how many parallel machines can be run within your CI build.

Problem with splitting tests on parallel machines

If you want to run your test suite on multiple CI nodes at the same time you need to decide which test file goes to particular CI nodes.

In a perfect scenario, we would like to run each parallel CI machine equal time. Thanks to that we won’t have to wait for slow CI node that runs too many tests and is the bottleneck for the whole CI build to complete.

The test suite is a living animal, there are constant changes in it, new tests are added or removed. The time of running particular tests can change and sometimes even be random when for instance your tests need to wait for some data to be loaded from external API.

#cypress #javascript #parallelisation #ci

Run Javascript E2E Tests Faster with Cypress on Parallel CI Nodes