Cypress (stripes-testing)
This section describes how cypress tests execute via Jenkins.
Cypress tests could be executed both in headful and headless modes. For execution in headless mode, one of the cypress docker images could be used https://docs.cypress.io/examples/docker
To execute cypress tests in 1 thread no additional configurations are needed, but for parallel multithread execution we use sorry-cypress GitHub - sorry-cypress/sorry-cypress: Open-source, free, self-hosted alternative to Cypress Dashboard and in this case specific logic implemented in Jenkins pipelines.
Launch logic
To run cypress tests in parallel treadss Jenkins pipeline consists of several stages, the core logic is to divide run into batches by number of executors each worker can handle (for current moment it is 4 executors per 1 “cypress“ worker, and 6 executors per “cypress-static“ worker).
For example
We want to run tests in 8 threads via “cypress“ worker.
So pipeline will divide 8 thread in 2 batches by 4 executors:
[[1,2,3,4],[5,6,7,8]]
In code, all behavior is described inside folioCypressFlow.groovy.