I am writing my E2E tests with testcafe against a test backend that doesn't support concurrency, i.e. if two tests execute in parallel, the test backend blows up.
When I am testing against one browser only, the tests execute serially. However, when I specify multiple browsers, the tests run serially per browser, but the tests get started in each browser at the same time.
I want testcafe to first execute all the tests in one browser, then open the next browser and execute all tests in it, etc.
Is this possible?
TestCafe doesn't have a built-in options for that. But you can configure it manually. For example you can setup running in the package.json
with the npm-run-all module:
"scripts": {
"test:chrome": "testcafe chrome c:/temp/test.js",
"test:ie": "testcafe ie c:/temp/test.js",
"test": "run-s test:chrome test:ie -c"
}
Also you can setup it in the node.js script with TestCafe Programming API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With