In this tutorial, we will create some tests in Ruby using RSpec and the rspec_junit_formatter gem.
The tests make use of Selenium, with the watir gem.
- Install the rspec, watir and rspec_junit-formatter
- Selenium server must be installed and running.
After running the tests and generating the JUnit XML report (e.g., rspec.xml), it can be imported to Xray (either by the REST API or through 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 the spec file 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 name of the created JUnit XML report file.