If you know the spec timings, you can create a JSON file and pass the timings to this plugin. The list of specs will be split into N machines to make the total durations for each machine approximately equal. You can see an example timings.json file:
You can pass the JSON filename via SPLIT_FILE environment variable or Cypressenv variable.
# split all specs across 3 machines using known spec timings
# loaded from "timings.json" file
$ SPLIT_FILE=timings.json SPLIT=3 npx cypress run
# the equivalent syntax using Cypress --env argument
$ npx cypress run --env split=3,splitFile=timings.json
For specs not in the timings file, it will use average duration of the known specs.
Split specs based on timings
If you know the spec timings, you can create a JSON file and pass the timings to this plugin. The list of specs will be split into N machines to make the total durations for each machine approximately equal. You can see an example timings.json file:
You can pass the JSON filename via
SPLIT_FILE
environment variable or Cypressenv
variable.For specs not in the timings file, it will use average duration of the known specs.