I have a particular case where I launch multiple instances of an app, rather than using fixtures or test data, I simply integrate user feedback as Cypress tests from login on forwards.
In any case, I used the specPattern
configuration property in cypress.json
to set the spec file run order:
{
"baseUrl": "http://localhost:5000",
"specPattern": [
"login/*.js",
"leads/new-lead.spec.js",
"leads/leads-list.spec.js",
"leads/lead-detail.spec.js",
"leads/lead-modify.spec.js",
//...
]
}
No file numbering needed 😀
This configuration property was added in version 10, see also:
- Ability to run spec files in a specific order · Issue #390 · cypress-io/cypress.
- Migration Guide: testFiles → specPattern