Links

CircleCI

Running cypress tests in parallel on CircleCI and Currents dashboard

How to run cypress in parallel on CircleCI?

Running cypress tests in parallel on CircleCI can help in decreasing overall run duration.
Create multiple containers that will run your cypress tests in parallel by setting the desired amount of containers with parallelism flag in config.yaml file.
Each container will receive a unique set of tests to run, so that your cypress tests will run faster and you can receive faster feedback from your browser test suite.
Currents orchestrates the tests between multiple containers, applying intelligent optimizations to reduce overall runtime of your workflow, records screenshots and videos for later troubleshooting.

How to setup CircleCI to run Cypress Tests in parallel?

Please refer to example repository that demonstrates how to setup CircleCI for running cypress tests in parallel using Currents service.
The example config file:
  • runs 5 containers with cypress tests in parallel
  • uses Cypress Orb
  • uses Custom Test Command to run currents for recording test results and parallelization with Currents.dev
  • Note: set your projectId from Currents.dev in currents.config.js
  • Note: use CLI arguments to customize your cypress runs, e.g.: cypress-cloud run --record --key <your Currents.dev key>
  • Note: create an organization, get your record key at Currents.dev and set Environment variable CURRENTS_RECORD_KEY
Here's an example of the demo run in Currents.dev dashboard, note that 3 cypress agents were used as part of this run:
Running cypress tests in parallel on CircleCI