Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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).

Image Added


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).


Image Added


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

...

Image Removed

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

...