Concurrent Setup
Closed this issue · 0 comments
WVAviator commented
One issue that may come up is having multiple suites, ideally running in parallel, that depend on the same setup functions. For example, if all suites rely on npm start
, then each one will try to run the command and all but one command will succeed.
With port listening, this may not be an issue - since each run of the command can check the port first to see if it's already open. However, for something like starting a test database in a Docker container for example - it could get messy.
Ideas I've had so far:
- A centralized config where before_all scripts can be defined for running all tests
- A way to detect duplicate scripts across suites and only run them once, maybe by script/command or by some user-defined naming convention
- Rely on port checking, as mentioned before
- Create an app config section of each suite the specifies a start script and a port number, and save before_all scripts for suite-level changes
- Figure out some way to execute suites in pseudo-isolated environments, or with port-mapping, without any required dependencies like Docker