Is there a way I could run parallel cypress executors without access to the cypress dashboard?
I'm trying to have cypress run my tests in parallel but it seems that you must have internet connectivity to reach the cypress dashboard to record the tests.
Anyone knows how I can get around this and have tests run in parallel without being dependent on Cypress Dashboard or a specific CI tool like Circle CI?
Thanks in advance!
To use it, simply add parallel: 4 to the GitLab CI job, and then call node parallelCypress. js <some options> . It will then scan for tests and split them up to the available parallel jobs, then invoke cypress with the --spec option, so that each job only runs a part of the tests.
Cypress restricts running tests parallelly on a local machine. The framework was explicitly designed to do this, and multiple reasons for this can be found in the Cypress official docs. Cypress provides a Parallel Testing option by setting up multiple machines.
By default, cypress run will run all tests headlessly.
Cypress is a free, downloadable and open source (MIT license) application. This is always free to use. Our Dashboard Service is a web application that offers a variety of billing plans (including a free, open source plan) for when you want to record your test runs in CI.
Look at this free solution https://github.com/agoldis/sorry-cypress I use only director service in docker-compose to make tests run parallel , as a simple example:
version: '3.7'
networks:
default:
external:
name: bridge
services:
cypress:
container_name: cypress
build:
context: ../
dockerfile: ./docker/cy.Dockerfile
links:
- director
ports:
- '5555:5555'
network_mode: bridge
cypress2:
container_name: cypress2
build:
context: ../
dockerfile: ./docker/cy.Dockerfile
links:
- director
ports:
- '5556:5556'
network_mode: bridge
mongo:
image: mongo:4.0
network_mode: bridge
ports:
- 27017:27017
director:
image: agoldis/sorry-cypress-director:latest
environment:
MONGODB_URI: "mongodb://mongo:27017"
network_mode: bridge
ports:
- 1234:1234
depends_on:
- mongo
you can try this cypress-parallel-specs-locally
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With