By default, Xray results reporting syncs mabl artifacts to Xray test cases at the global test level. If your organization requires evidence to be synced at the step level, you can enable step-level evidence mapping within the mabl Xray integration settings.
This article outlines the recommended workflow for implementing Xray results reporting at the step level.
Before you start
For successful step-level evidence mapping between mabl and Xray, the steps in your mabl tests and Xray test cases must match exactly:
- If the number of tests in the mabl test does not match the number of tests in the associated Xray test case, results will not sync correctly. For example, if an Xray test case has 10 steps and its associated mabl test has 15 steps, the step-level evidence from the mabl test will get truncated after the 10th step.
- mabl evidence is mapped to the step as described in the Xray test case. If corresponding steps in mabl and Xray describe different actions, the mabl evidence could be misleading. For example, if the first step of the Xray test case is “Log in”, but the first step of the mabl test is “Set viewport to…” the status and screenshot from the set viewport step would appear to be associated with the “Log in” step in Xray.
Turn on step-level sync
To enable step-level syncing for your Xray project:
- Go to the integrations page in the mabl app: Settings > Integrations.
- Edit your existing Xray integration or create a new one.
- On the integration settings page, confirm that Map status and evidence for steps is toggled on.
Create Xray test details from mabl tests
To ensure successful evidence mapping between mabl test steps and Xray test cases, we recommend the following workflow for syncing step-level artifacts:
- Create the test in mabl.
- Export the mabl test as a CSV file from the test details page.
- In Xray, create a new test case.
- In the Test Details section of the Xray test case, import the mabl test CSV file.
- Set the Test type to “Manual”
- Map the “Step” field in the mabl test CSV to the “Action” field in the Xray test case
Test updates
If you update your mabl test or add/remove steps, you must make the corresponding changes to your Xray test case.
Associate the mabl test with the test case
After creating the Xray test case, go back to the mabl app and associate the test with the test case:
- On the test details page, click on the pencil icon.
- In the Update test information modal, click on the Xray button and enter the Xray project and test case ID.
When mabl test runs complete, you can publish the results in Xray and review evidence at the step level.
Reviewing mabl evidence on an Xray test step
Limitation
Step-level mapping requires that mabl and Xray steps match exactly. Because mabl loops can run an indeterminate number of times, step-level evidence mapping is not currently supported for mabl tests that contain loops.