Page History
Table of Contents |
---|
Introduction
This article provides a guide to troubleshooting common issues and optimizing your testing workflow when importing tests using the Xray API or UI on both Jira Data Center and Jira Cloud.
...
Common Issues & Potential Solutions:
Software Version
Confirm whether you are using Xray Cloud or Xray Data Center and adapt to our documentation accordingly.
Do you want to confirm your Xray Version? → [Xray] How can I find my Xray version?
Importing Test using Xray Cloud
Info | ||
---|---|---|
| ||
How are you importing results? |
API
API Version Issues:
If you are encountering issues with the v1 API, consider switching to the v2 API.- Cloud v1 → REST API v1
- Cloud v2 → REST API v2
Incorrect API Endpoint:
Make sure you’re using the correct API endpoint for importing test results. For Xray Cloud, the endpoint is different from the one used for Xray Data Center.- Cloud v1 → Importing Tests - REST
- Cloud v2 → Importing Tests - REST v2PUB
Data Format Issues:
Ensure your test results are in the correct format. For example, when importing JUnit results, make sure your tests are generating JUnit reports in the correct format.- Verify JUnit Structure → Taking advantage of JUnit XML reports
-
UI
Data Format Issues:
Ensure your test results are in the correct format. For example, when importing JUnit results, make sure your tests are generating JUnit reports in the correct format.- Verify JUnit Structure → Taking advantage of JUnit XML reports
Importing Tests using Xray Data Center
Info | ||
---|---|---|
| ||
How are you importing results? |
- Looking for Xray Data Center article? → [Xray DataCenter] I'm unable to import Tests
Authentication Issues
Ensure you have the correct authentication credentials for the Xray API. This typically involves a client_id and client_secret.
- How-to → [Xray Cloud] How to get API Keys & [Xray Cloud] Can't generate API Keys (no user found)
- Documentation → Authentication - REST v2PUBLISHED
You may also have authentication errors as described below:
- 400 Bad Request -
- Possibly linked to a wrong request syntax.
- No import test job was created. The content may be in the wrong format or a job might already be in progress.
- Each user can only have one import job running at each given time. So if a job is running and the user tries to start another one, this will result in a 400 response.
- There is a maximum of 1000 tests that can be imported each time, if the input contains more tests than this, the request will also result in a 400 response.
- 401 Unauthorized - Possibly linked to your Xray license may no longer be valid
- 500 INTERNAL SERVER ERROR - An internal error occurred when authenticating the request.
- There may be an error if your authentication token is revoked, in which case you should submit a new authentication.
Info | ||
---|---|---|
| ||
The method you choose to import your test will determine the aspects you need to address. |
Importing using API
API Version Issues:
If you are encountering issues with the v1 API, consider switching to the v2 API.- Cloud v1 → REST API v1
- Cloud v2 → REST API v2
Incorrect API Endpoint:
Make sure you’re using the correct API endpoint for importing test results- Tests. For Xray Cloud, the endpoint is different from the one used for Xray Data Center.
- Cloud v1 → Importing Tests - REST
- Cloud v2 → Importing Tests - REST v2PUB
Data Format Issues:
Ensure your test results - Tests are in the correct format. For example, when importing using JUnit results
- , make sure your tests are generating JUnit
- reports in the correct format.
- Verify JUnit Structure → Taking advantage of JUnit XML reports
When importing data via an API, format issues often arise in the request. For instance, when using the
curl
command, an incorrect number of quotation marks, or hidden characters can cause the request to fail.Parameter-related issues are also frequent. If you provide the wrong Project key or Test Key, it can lead to problems during the import process.
Importing using UI
Data Format Issues:
Ensure your test results - Tests are in the correct format. For example, when importing using JUnit results
- , make sure your tests are generating JUnit
- reports in the correct format.
- Verify JUnit Structure → Taking advantage of JUnit XML reports
Confirm if you are using API to import your tests
Authentication Issues: Ensure you have the correct authentication credentials for the Xray API. This typically involves a client ID and client secret.
- Are you missing credentials? → [Xray Cloud] How to get API Keys
API Version Issues: If you’re encountering issues with the v1 API, consider switching to the v2 API.
- Cloud v1 → REST API v1
- Cloud v2 → REST API v2
- Data Center v2 → REST API v2
Incorrect API Endpoint: Make sure you’re using the correct API endpoint for importing test results. For Xray Cloud, the endpoint is different from the one used for Xray Data Center.
- Confirm which endpoint you are using for importing test results.
- → Data Center |
- → Data Center |
- → Cloud v1 | Importing Tests - REST
- → Cloud v2 | Importing Tests - REST v2PUBLISHED
- Confirm which endpoint you are using for importing test results.
Note | ||
---|---|---|
| ||
Other Common Issues:Error Messages: Understand common error messages and their solutions. For example, a 404 error might indicate that you’re trying to import results to the wrong server. |
...
A “No Project” error might indicate an issue with the project key in your import file. |
Data Format Issues: Ensure your test results are in the correct format. For example, when importing JUnit results, make sure your tests are generating JUnit reports in the correct format.
Software Version Issues: If you’re encountering issues after an Xray or Jira update, it could be a software bug. Check the Xray support portal for known issues and updates. |
JUnit Integration
Ensure that your tests are integrated with JUnit and that the JUnit XML output of your test runner is correctly configured.
JUnit Report Generation
Make sure your tests are generating JUnit reports in the correct format. Xray can import these reports to create Test Executions
...
Check that you’re using the correct API endpoint for importing JUnit results2. For Xray Cloud, the endpoint is different from the one used for Xray Server
Error Messages
Understand common error messages and their solutions. For example, a 404 error might indicate that you’re trying to import results to the wrong server.
JUnit Extensions
...
Looking to learn more:Check out this: TTT: Examples using JUnit |