Page History
...
No Format |
---|
testcafe chrome test1.js test2.js --reporter xunit > results.xml |
In case you want ro run your tests concurrently, you can pass an argument to identify the number of sessions and the browsers to use.
No Format |
---|
testcafe -c 10 chrome,firefox test1.js test2.js --reporter xunit > results.xml |
It is also possible to perform headless testing (e.g. use "chrome:headless" as the browser name, for example).
No Format |
---|
testcafe "chrome:headless" test1.js test2.js --reporter xunit > results.xml |
After running the tests and generating the JUnit XML reports (e.g., results.xml), they can be imported to Xray (either by the REST API or through the Import Execution Results action within the Test Execution).
JUnit's Test Case is mapped to a Generic Test in Jira, and the Generic Test Definition field contains the name of of the fixture concatenated with the name of the test .
The Execution Details of the Generic Test contains information about the Test Suite, which in this case contains the identification of the target environment (i.e. browser + OS).
Running tests using cloud providers
To run them in the cloud using BrowserStack, the command line would be something like this (BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY environment variables would need to be defined beforehand):
...
No Format |
---|
testcafe "saucelabs:Chrome@66.0:Windows 10" test1.js test2.js --reporter xunit > results.xml |
...
results.xml |
...
JUnit's Test Case is mapped to a Generic Test in Jira, and the Generic Test Definition field contains the value of the "it" concatenated with the several "describe"' that make up the test case.
The Execution Details of the Generic Test contains information about the Test Suite, which in this case corresponds to the concatenation of the test's "describe".
...
References
- https://devexpress.github.io/testcafe/
- https://devexpress.github.io/testcafe/documentation/getting-started/
- https://devexpress.github.io/testcafe/documentation/recipes/using-page-model.html
- https://github.com/DevExpress/testcafe-reporter-xunit
- https://dzone.com/articles/testcafe-e2e-testing-tool
- https://testcafe-studio.devexpress.com/documentation/getting-started/
- https://medium.com/yld-engineering-blog/evaluating-cypress-and-testcafe-for-end-to-end-testing-fcd0303d2103
...