« Blog Home


What is PyTest?

PyTest is a testing framework for writing tests using Python. You can write code to test APIs,  databases, UIs etc.
PyTest can write the results to an XML file, which then can be used for further processing.

More about PyTest in https://www.guru99.com/pytest-tutorial.html

What is Xray Test Management for Jira?

Xray is a Jira plugin for the management of manual and automated tests. Xray creates a number of new issue types in Jira, like Test Plan, Test, and Test Execution. 
A Test issue is used to define test cases of different types that can be executed multiple times using Test Execution issues.

PyTest-Xray Integration

If we want to run tests using PyTest and see the results in Xray, how do we do it?

We at ALM-Toolbox have learned how to use Xray API to import PyTest XMLs to Xray so that PyTest results are shown as Xray Tests.

For example, we have created an XML file containing two tests, test_file1_method1, which failed,  and test_file1_method2, which succeeded.  We have imported that XML file to a Test Execution issue (SCOP-12), and now you can see below that issue with two Tests, SCOP-3 and SCOP-4:

What we can do for you?

We can create scripts to automate the above process and to adapt them to suit your needs so that the results of your PyTest runs are written seamlessly to Xray.

Related links: