Versions Compared

Key

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

...

After successfully running the tests and generating the aggregated JUnit XML report (e.g., merged-test-results.xml), it can be imported to Xray (either by the REST API or through the Import Execution Results action within the Test Execution, or even by using a CI tool of your choice).


Code Block
languagebash
titleexample of a Bash script to import results
collapsetrue
curl -H "Content-Type: multipart/form-data" -u admin:admin -F "file=@./merged-test-results.xml" http://jiraserver.example.com/rest/raven/1.0/import/execution/junit?projectKey=CALC



Each JUnit's test is mapped to a Generic Test in Jira, and the Generic Test Definition field contains the name of the package, the class and the method name that implements the Test Case. The summary of each Test issue is filled out with the name of the method corresponding to the JUnit Test.

...