tnicola / cypress-parallel

Reduce up to 40% your Cypress suite execution time parallelizing the test run on the same machine.
MIT License
560 stars 117 forks source link

When we have cy-grep implemented to select specific tests, running it via cypress-parallel leads to failure while building report (causing buildkite build to fail) #174

Open prabodhkelkar opened 9 months ago

prabodhkelkar commented 9 months ago

When we have cy-grep implemented to select specific scripts for executions, running it via cypress-parallel leads to failure while building report (causing buildkite build to fail)

I have implemented tags to select specific test scripts for executions using cy-grep (https://github.com/bahmutov/cy-grep). The execution script used is as below - "cy:nxs-dev-original": "npx cypress run --env fileConfig=nxs-dev,grepTags=@nxs-dev --browser chrome"

With cypress-parallel, the execution script becomes - "cy:nxs-dev-parallel": "cypress-parallel -s cy:nxs-dev-original -t 2 -d 'cypress/e2e/05/.cy.ts' -r 'cypress-mochawesome-reporter' -o 'cypressParallel=true'"

Cypress specs directory specified above has 2 spec files, but only one has "@nxs-dev" tag. So, only will get executed to generate report file. But, when execution is complete, cypress-parallel compares "Test suites found" (which is 2 in this case) with "Test suite results" (which is 1). As this does not match, Error is returned to buildkite - causing the build to fail.

image

Can we add an option to not compare this "Test suites found" with "Test suite results"?