Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA-XRAY - REST API - error

Ajay Taneja
Contributor
January 20, 2023

 

deleted

2 answers

2 accepted

0 votes
Answer accepted
Stefan Salzl
Community Champion
January 30, 2023
0 votes
Answer accepted
Asha Goyal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 22, 2023

The error message you are receiving, {"error":"components: components"}, suggests that the Jira API is expecting the imported test results to include information about the components that the tests are associated with, but the information is not being provided in the request.

To fix this, you will need to add a parameter to your curl command that specifies the component(s) associated with the test results. The parameter should be added to the end of the URL in your curl command and should be in the format of "&components=component1,component2,component3" where "component1, component2, component3" is a list of the component names.

It is also possible that the issue is coming from the permissions you have on the project, check if you have the right permission to import test results.

Another thing is to check the xml file you are uploading. Make sure that it is a valid junit report file.

It is also recommended to check the Jira API documentation to confirm the format of the data that is expected in the request and to see if there are any other parameters or settings that may be required.

Ajay Taneja
Contributor
January 25, 2023

Hi @Asha 

That didn't work:

I got the same error 
Ajay Taneja
Contributor
January 25, 2023

I have the permissions to import results and the file is I'm sure correct

Suggest an answer

Log in or Sign up to answer