most-airline-43297
03/02/2023, 6:02 PMnpx cypress run --record --key <some key> --parallel --headless
I expected that Cypress will run the tests in parallel across multiple machines, when I verify in the dashboard if it ran on multiple machines, it just states that it ran on 1 machine, and the speed could be improvement by adding more machines. For this PoC it just has 4 tests.
Apparently I am doing something wrong, but I am not entirely sure what.
- What am I missing?
- How I can distribute the tests over multiple machines to speed up the execution? Because there are multiple runners available in our Gitlab instance.
Thanks in advance!
Gitlab file
variables:
npm_config_cache: "$CI_PROJECT_DIR/.npm"
CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress"
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm
- cache/Cypress
- node_modules
build_cypress:
image: <cypress image in container registry>
<<: *cypress_rules
stage: prepare
script:
- cd legacy/e2e
- npm ci
- npx cypress cache path
- npx cypress cache list
run_cypress_folder_1:
image: <cypress image in container registry>
<<: *cypress_rules
stage: test
parallel: 5
script:
- cd legacy/e2e
- npm install cypress
- npx cypress run --record --key <SOMEKEY> --parallel --headless
artifacts:
when: always
paths:
# the path here is needed to expose the file and be able to send it to Datadog.
- $CI_PROJECT_DIR/legacy/e2e/cypress/results/**/*.xml
https://docs.cypress.io/guides/guides/parallelization
https://docs.cypress.io/guides/continuous-integration/gitlab-cienough-truck-68085
03/02/2023, 6:10 PMCypress' parallelization strategy is file-based, so in order to utilize parallelization, your tests will need to be split across separate files.most-airline-43297
03/02/2023, 6:32 PMgray-kilobyte-89541
03/02/2023, 6:45 PMmost-airline-43297
03/02/2023, 6:53 PMmost-airline-43297
03/02/2023, 7:05 PMgray-kilobyte-89541
03/02/2023, 7:41 PM