cypress-parallel
cypress-parallel copied to clipboard
Specify Cypress Config for each thread
Is it possible to specify a different cypress config that can be used for each executing thread? Basically, I want the ability for each thread to execute containing different cypress environment variables.
The only way I can think of on how to do that is to add a switch at the top of every spec to check the environment variable "PARALLEL_THREAD" and determine which config to load based on that. However, it seems like it would be possible to specify a directory containing different configs, or perhaps different cypress.env.json files. As long as the number of configs matched the number of threads specified, then it could assign a different config to each thread.
Is there an alternative way to accomplish this that currently exists?
Is there a reason why you need this to be run by the same parent process? (my guess is for reporting, but that will shape the possible alternatives)
I would personally need this feature to run the tests on different ports (localhost:3000, localhost:3001, localhost:3002, etc.)
I'm on the same boat. I need each thread to point to a different baseUrl (since each baseUrl will be pointing to a different database). It's the only way we can parallelize our tests, because we're resetting the database for each spec