In this tutorial, we will create some tests in Python using pytest.
- Install the Python "pip"
- Install "pytest"
Below are two Python scripts implementing tests with subtle differences.
After running the tests and generating the JUnit XML report (e.g., py-results1.xml), it 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 "pytest" concatenated with the name of the method that implements the test case.
The Execution Details of the Generic Test contains information about the Test Suite, which in this case corresponds to "pytest".