tnicola / cypress-parallel

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

Not working with cypress-cucumber-preprocesor #75

Closed hamzazaidi closed 2 years ago

hamzazaidi commented 2 years ago

When using cypress cucumber preprocessor in a typical setup the .feature file and stepDefinition folder lives in the integration folder of cypress, in cli.js

https://github.com/tnicola/cypress-parallel/blob/master/lib/cli.js#L90

This line above is not letting the process to be finish because the statement is always falsy. testSuitePaths is returning the files that include .feature files and resultMaps only return the number of test runs which will never going to match.

This check is not fool prove it has made assumption if (timeMap.size !== testSuitePaths.length), it assumes that testSuitePaths will always going to have the number of files equal to files in resultMaps.

This tool has a great potential but this needs to be fix by some way, i am suggesting to optionally ignore the check and let consumer decide if they want to that check or add modes like strict: true and do this check else ignore this check.

hamzazaidi commented 2 years ago

@tnicola do you have opinion this ?

tnicola commented 2 years ago

Hi @hamzazaidi , I didn't know about this cucumber preprocessor issue. Yes it makes sense to have that check as default and just disable it when not needed.

With v0.8.4 you can now run your test and disable that check with the new strictMode flag: -m false. Give it a try and let me know!

hamzazaidi commented 2 years ago

@tnicola works really well. Thanks