Introduction to Test Management With Xray for Jira
Jira wasn’t originally designed for test management. However, in 2013, Xray debuted as a Jira add-on. Xray is currently one of the most popular Jira add-ons as more companies are beginning to invest in testing.
An Introduction to Xray for Jira Test Management
This article will cover three important aspects of testing that Xray helps you handle.
- Managing test cases
- Automating test execution
- Generating test reports
Let’s get into the details!
Managing Test Cases
Xray helps you manage your tests in an organized way. It lets you create tests, group them into test sets, and create test plans. When you create something new, you have some options:
If you’re creating a test, for instance, you have the option of creating a manual, Cucumber, or generic test. (Later in the article, we’ll discuss Cucumber a bit more.)
Each one of these has its own configuration details, which are beyond the scope of this article. Once you’ve made your choice, you can add the test steps to be executed.
Next, Xray gives you the option of adding the test to a test set. A test set is a way of grouping tests based on feature or some other criteria. This makes it easier to find or sort tests later on.
Another interesting functionality to note is “Pre-Conditions.” Xray allows you to add pre-conditions to a test that should be executed before the test itself. A simple use case for pre-conditions is a note-taking application that requires users to log in. Logged-in users will be able to access previously created notes and create new ones. In this instance, the pre-condition is the login. Xray allows you to create a pre-condition that you can reuse across any tests that require a logged-in user.
Finally, Xray provides an extra feature called test execution. Basically, it allows you to specify the tests to be run, the test environment, and the time to run the tests. Using this feature, you can schedule tests to run at any given time.
This should give you a general overview of how you can create, group, and execute tests using Xray.
Automating Test Execution
In the previous section, you saw how Xray allows you to create three types of tests: manual, Cucumber, and generic. You can automate tests in Xray by creating Cucumber tests. Alongside Gherkin—grammar rules to convert a plain text to Cucumber format—you can create automated tests. You’ll need to implement the code to run for each scenario. Lastly, you’ll need to publish the results in a structured format to the Jira REST API.
Your chosen platform for continuous integration and continuous delivery or deployment can handle the last step. After you run each test, you’ll see the results posted to the Jira REST API, which is updated on the Xray app. You can find the details of the required format in the Xray documentation.
Generating Test Reports
Once you’ve executed tests, you can generate a traceability report to see their details. The report shows the requirements, tests, test runs, and defects.
For failed tests, the column for defects shows the reason for the failed test.
You can export the report in CSV format for further analysis. You can also integrate Xray with another Jira application, Confluence, to present the results in a clearer, more useful format.
Since both applications are Jira products, they should work seamlessly together with a few tweaks. The results are dynamic. Automatic updates appear on Confluence as they happen.
Xray is a tool that lets you streamline the process of test management and automation. It helps you organize and manage tests, automate the process of test execution, and generate test reports. You can learn more about Xray with this course.