Xray
Xray export sends test cases and launch data from Allure TestOps into Xray. The export is one-way from TestOps into Xray and Jira. It covers:
- exporting test cases from TestOps into Xray;
- exporting launch data for the selected test-case set;
- supporting both Jira Data Center and Jira Cloud variants of Xray;
- scoping the export with AQL.
If your real goal is to keep an external test key on a test case, use Test keys and Allure IDs. If your goal is a one-time migration, use Migrating from other solutions.
Xray Cloud and Xray for Jira Data Center do not share the same credential contract. Treat them as two different setup variants.
Before you begin
- The Jira deployment type behind Xray — Data Center or Cloud.
- Jira credentials for the destination project.
- For Xray Cloud: an Xray client ID and client secret.
- The AQL filters that define which test cases and launches should be exported.
1. Create the required credentials
Jira API token
Skip this step if you prefer to use a username and password for Jira.
In Jira, click your avatar and go to Profile.
In the left menu, click Personal Access Tokens.
Click Create token.
Fill in the fields:
- Token Name — a name to identify the token, for example
Token for Allure TestOps. - Expiry date — how long the token should stay valid. To create a token with no expiration, uncheck Automatic expiry.
- Token Name — a name to identify the token, for example
Click Create and copy the generated token. Save it in a secure location.
- In Jira, click your avatar and go to Manage account.
- In the top navigation, go to Security.
- Under API tokens, click Create and manage API tokens.
- Click Create API token.
- Enter a name to identify the token, for example
Token for Allure TestOps. - Click Create, then click Copy. Save the token in a secure location.
Xray API key (Jira Cloud only)
No additional Xray token is required for Jira Data Center.
- In Jira, go to Apps → Manage your apps in the top navigation.
- In the left menu, click Xray → API Keys.
- Click Create API Key.
- In the User field, type your name or email and select your account.
- Click Generate.
- Copy both Client ID and Client Secret. Save them in a secure location.
2. Add the global Xray integration
An instance administrator should:
Open Administration → Integrations in TestOps.
Click + Add integration.
Select the Xray integration type that matches the deployment:
- Xray Test Management for Jira for Jira Data Center;
- Xray Test Management for Jira Cloud for Jira Cloud.
Fill in the fields:
- Name — a stable name for the integration, for example
Xray production. - Endpoint — the URL of the Jira instance, for example
https://example.atlassian.net/.
- Name — a stable name for the integration, for example
Click Add integration.
3. Enable Xray in the TestOps project
In TestOps, open the target project.
Go to Settings → Integrations.
Under Available integrations, find the Xray integration and click Add integration.
Enter the credentials that match the deployment type:
On the basic tab, enter the Jira username and password.On the token tab, enter the personal access token from step 1.
Fill in the fields:
- Username — the email used to sign in to Jira Software Cloud.
- API token — the Jira API token from step 1.
- Xray Client ID and Xray Client secret — the Xray credentials from step 1.
Click Test connection. If the credentials are correct, a "Connection established" message appears.
Click Add integration.
4. Create the TMS Sync export configuration
In the TestOps project, go to Settings → Integrations and open the Xray integration.
Go to the TMS Sync tab and click Create.
In the Project list, select the destination Jira project.
Fill in the export scope:
- Test Case AQL — an AQL expression for the test cases to export. Leave empty to export all test cases.
- Launches AQL — an AQL expression for the launches to export. Leave empty to export all launches.
- Disable Test Case create — enable after the initial export if the destination should only receive updates for already exported cases.
- Disable Launches sync — enable if the job should export test cases without launch history.
- Disable export — enable to pause the configuration without deleting it.
Click Submit.
An empty Test Case AQL exports all eligible test cases into the selected Jira project. An empty Launches AQL exports all launches for that scope.
For the first rollout, start with a narrow Test Case AQL and temporarily disable launch export until the created Xray-side records look correct. It is much easier to widen the scope after the first successful export than to clean up an overly broad initial sync.
The TMS sync is automatically disabled if the credentials are invalid, revoked, or have insufficient access. To restore sync, update the project integration and re-enable the export.
Verify the integration
- Run the export configuration.
- Open the destination Jira project and confirm that the expected Xray-managed records appear.
- If launch export is enabled, confirm that the expected execution data arrives for the exported test-case set.
Troubleshooting
The project integration saves, but export cannot start
Recheck the credential type against the deployment type. Jira Cloud requires both the Jira API token and the Xray client credentials, while Jira Data Center uses Jira-side authentication only.
Also confirm that the destination Jira project is accessible with the same credentials. Saving the project integration proves authentication, but the export still needs access to the target project and the Xray app context.
The export configuration disables itself
The project credentials are invalid, revoked, or no longer have sufficient access to the destination Jira project. Update the project integration and re-enable the export.
For Jira Cloud, recheck the Xray client credentials separately from the Jira API token — it is common for one side to be valid while the other is not.
Related pages
- Test management sync and export for the broader exchange model.
- Test keys and Allure IDs for identity linking instead of outbound sync.
- Migrating from other solutions for one-time migration workflows.