Run Cypress tests in parallel without Dashboard: Tutorial

Save Time & Costs by Parallel Testing in Cypress. Use BrowserStack Automate to Test on Real Devices & Browsers Effortlessly

guide-banner
Home Guide Run Cypress tests in parallel without Dashboard: Tutorial

Run Cypress tests in parallel without Dashboard: Tutorial

Cypress is a powerful end-to-end testing framework, but its built-in Dashboard service isn’t the only way to run tests in parallel. You can also run Cypress tests in parallel, without using the Dashboard.

Overview

Why run Cypress Tests in Parallel without Dashboard?

  • Faster Test Execution
  • No Vendor Lock-in
  • Cost-Effective Scaling
  • Improved CI Integration
  • Data Privacy & Compliance
  • Custom Analytics

How to Perform Cypress Parallel Execution Without Dashboard

  • Method 1: cypress-parallel – A community plugin that distributes test specs across multiple processes for faster execution.
  • Method 2: cypress-split – An official Cypress plugin that splits test specs across CI jobs using environment variables.

In this tutorial, you’ll learn how to speed up your test suite by running Cypress tests in parallel, without using the Dashboard, using your own CI setup and custom logic for test distribution.

What is Cypress Parallelization?

Tests built using Cypress run very fast and in any real time project the tests grow from 100s to 1000s. If you run the test in sequential manner (1 at a time), no matter how fast the test execution in Cypress is, it is still going to take a good amount of time.

Cypress provides a feature to run tests in Parallel in CI runs using the Cypress Cloud. To use this feature, users should enable Cypress Cloud Integration with our Project and set the flag –parallel in the cypress execution command.

The Cypress parallel in built feature requires Multiple agents configured in CI run and Cypress balances the load based on the agents and number of spec files.

Running Cypress Tests Sequentially vs in Parallel

Why is it important to run Cypress Tests in Parallel

To speed up the tests you need to run our tests in Parallel. Parallelization refers to executing multiple tests at any given time.

Taking example of three tests

  1. Test1 takes 5 minutes
  2. Test2 takes 10 minutes
  3. Test3 takes 5 minutes

When executing these tests in Sequential mode it will take 20 minutes. But if you run these three tests in parallel it will average to 10 minutes (It saved 10 minutes!).

Why run Cypress Tests in Parallel without Dashboard?

Running Cypress tests in parallel, without using the Cypress Dashboard, allows teams to accelerate test execution while avoiding external dependencies, subscription costs, and data exposure.

Key Benefits:

  • Faster Test Execution: Split test specs across multiple machines or containers to reduce total test run time.
  • No Vendor Lock-in: Avoid dependency on the Cypress Dashboard or paid plans.
  • Cost-Effective Scaling: Leverage your own infrastructure or CI runners for parallelization.
  • Improved CI Integration: Easily integrate with GitHub Actions, GitLab CI, Jenkins, or others.
  • Data Privacy & Compliance: Keep test data and logs within your organization’s environment.
  • Custom Analytics: Use open-source or custom tools to track results without dashboard limitations.

How to run Cypress Tests in Parallel without Dashboard

Before trying to run tests in Parallel without Dashboard, lets run the three tests which can be found here

Folder Structure of Cypress Tests in Parallel

And if you execute below command in command line, three tests will be run against Browser Stack’s Demo application

npx cypress run --spec "cypress/e2e/dropdown-examples/*.js"

It is taking 29 Seconds for executing three tests in Sequential mode

Running Cypress Tests Sequentially

Now to run tests in parallel without Cypress Dashboard, We are going to use two plugins in this article

  1. cypress-parallel
  2. cypress-split

Method 1: Using cypress-parallel

You need to install the plugin cypress-parallel.

Install the Cypress Parallel plugin to run Cypress Tests in Parallel without Dashboard

To install this plugin run the below command from root of your project

npm i cypress-parallel

Once the plugin is installed, all you need to do is execute below command

npx cypress-parallel -s cypress:run -t 3 -d "cypress/e2e/dropdown-examples/*.js"

In the above command, using cypress-parallel plugin to execute cypress tests. This command contains three parts

  1. -s <npm script> – -s cypress:run( cypress:run is the npm script which exists in our package.json file)
  2. -t <number of threads>
  3. -d <spec file path>

Executing the above command will create a parallel-weights.json file and the spec files are divided based on this file and run in parallel based on the thread number provided

Creating Parallel Weights JSON file to run Cypress Tests in Parallel without using Dashboard

You need to ensure that the thread number provided should be based on the agent’s Hardware capacity.

Run Cypress Parallel Tests on Real Devices

Method 2: Using cypress-split

You can use this plugin to run the cypress tests parallel in CI builds.

Installation instruction can be found here

With this plugin you can run specific tests across multiple containers or you can run with multiple agents

Below Github action will run the specific specs in Parallel on the 2 containers

Run the specific specs of Cypress Tests in Parallel on the 2 containers

Below Github action will run all the tests in Parallel in across multiple agents

Run all Cypress tests in Parallel in across multiple agents using Cypress Split

The working example of Github actions can be found here

Once the Github action is executed as part of CI build, it will produce a summary report like below

Github summary report

Github link for the above summary report can be found here

Run Cypress Tests on Real Devices

Benefits of Cypress Parallelization without Cypress Cloud

By using the two plugins as discussed above, you can run tests in Parallel without purchasing paid plans in Cypress Cloud.

You can also configure whether to run these tests in parallel across multiple agents or within a single agent with multiple containers.

BrowserStack Automate Banner

Limitations of Cypress Parallel Execution without Cypress Cloud

Cypress cloud offers helpful Analytics, such as

  • Runs Status: Users can filter the Run status by Branch, Tag, No of Days, Group by Daily, Weekly, Monthly and Quarterly

Run Stats of Cypress Parallel Test Execution without Dashboard

  • Run Duration: Provides analytics on the Average run duration, Agents used and Time saved while running in Parallel mode

Run Duration of Cypress Parallel Tests during Execution without Dashboard

  • Test Suite Size: Provides analytics on the test suite added over a period of time

Test Suite Size during Cypress Parallel Test Execution without Dashboard

  • Top Failures: Provides analytics about top failing test cases over period of time

Test Failures during Cypress Parallel Test Execution without Dashboard

  • Slowest Tests: Provides analytics on the tests that taking more time and making execution slower over a period of time

Slow running Tests during Cypress Parallel Test Execution without Dashboard

  • Most Common Errors: Provides analytics on the failing tests by grouping based on the error thrown

Most common errors during Cypress Parallel Test Execution without Dashboard

  • Flaky Tests:  Provides analytics on the flaky tests based on the retry over a period of time

analytics on the flaky tests

Talk to an Expert

Conclusion

This article highlighted what is Parallel execution, How to achieve the Parallel Cypress tests execution by using plugins without using dashboard and also the limitations of not Using Cypress Cloud for Parallel execution.

Post Test Execution Analytics is critical to understand the run duration, tests performance and errors and this feature is available in Cypress Cloud which will benefit the projects tremendously.

Whenever running Cypress tests, it is recommended to test on real devices so that the  real user conditions can be taken into account for better accuracy of test results. Tools like BrowserStack Automate help QAs by providing access to 3000+ device browser combinations for a comprehensive automated testing.

Run Cypress Tests on Real Devices

Tags
Automated UI Testing Automation Testing Cypress