Open jgonzalezalbisu opened 1 year ago
I started to use cypress parallel last week, and I had a similar issue. Turns out that setting spec and browser on the "original-command" as you do can cause issue.
Either remove those params from the original-command
in your scripts or create a new command to use only with cypress-parallel. It should start behaving properly.
@lems3 That seems to work, thank you :)
@lems3 any suggestions for me I'm hitting this same issue this is the command I'm using, This is a script that sits in the cypress directory and is referenced from my package.json as
"cy:runParallel": "python3 runParallel.py",
cypress-parallel -s cy:run -t {thread_count} -d \"cypress/e2e/*/.spec.ts\" " f"-a \" --browser chrome --headed --env grep={test_id_arguments} --spec '{formatted_file_paths}'\""
I am greping for specific strings, and I am passing in all the different spec files.
@adoshi-branch I don't have a lot of experience with python, but I think you're facing the same limitation, where setting specs twice causes issues.
You'd need to find a way to only use the -d
argument from cypress-parallel, as it will set cypress' --spec
when running.
@lems3 thanks it looks like I need to find a way to combine both as -d should be the directory of where the tests are and the --spec is what specific spec files I'd like to run. If I find a solution I'll post back here.
When running tests using parallelization and the
cypress-tags
(https://www.npmjs.com/package/cypress-tags) library together, I see that the X executions are opened (x being the number of threads passed to the command witht
) but both threads are executing the same things and specs are not being split in different threads.Here is what I've got in my
package.json
:And when running the script
parallel-command
, I see that the the spec files are run in both threads and no splitting is being done. Am I missing something? Could it be cause it's the first run I'm doing and there is no weigh file?Would you be able to help me?
Thanks!