I use Xray for JIRA Jenkins Plugin to upload test results to Jira as a post-build action
Console output in Jenkins provides error below:
[INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:17 min [INFO] Finished at: 2021-06-28T19:21:23Z [INFO] ------------------------------------------------------------------------ TestNG Reports Processing: START Looking for TestNG results report in workspace using pattern: **/target/surefire-reports/testng-results.xml Saving reports... Processing '/data/jenkins/home/jobs/tests/builds/4/testng/testng-results.xml' TestNG Reports Processing: FINISH Starting XRAY: Results Import Task... ########################################################## #### Xray is importing the execution results #### ########################################################## File found: /var/lib/jenkins/workspace/tests/target/surefire-reports/testng-results.xml Starting to import results from testng-results.xml ERROR: Step ‘Xray: Results Import Task’ failed: Unable to confirm Result of the upload..... Upload Failed! Status:400 Response:{"error":"components: components"} Finished: FAILURE
XRay result import task Format: TextNG XML
Project Key: HIS (the name of my Jira project)
Hi @Iryna R
This error means that the Components custom field is not present in your project HIS.
Please edit the fields in the Project Settings and add the Components to your project.
Kind regards,
Rogério Paiva [Xray Support Team]
Hi @Rogério Paiva - Xray Xporter . I get the same error (not from jenkins, but from Postman) :
{"error":"components: components"}
I see that, in the JIRA ticket with the feature that in the end generates my json (the one with the results), I have a "Component" custom field with a value. I guess this mean I already have "Components" added to my project.
I`m using this method (Xray for Jira Sever): https://docs.getxray.app/display/XRAY/Import+Execution+Results+-+REST#ImportExecutionResultsREST-CucumberJSONresults
and I don´t see in the example input any "Component" field, so I don't understand where the problem is... Am I missing something? Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would you please add a screenshot of the "Component" custom field with a value?
If you don't want to show your information here, please reach out to the Xray Support (http://xraysupport.getxray.app) to share your configuration so that the support team can troubleshoot the cause.
Thank you.
Kind regards,
Rogério Paiva [Xray Support Team]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Rogério Paiva - Xray Xporter . I finally resolved this problem by using the "Cucumber JSON results Multipart" endpoint, which requires one json with the results and another one with the info of the field(s) that is required and the project ID, like this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Excellent! Great news!
Yes, indeed, the multipart is a good alternative when you have mandatory fields.
Thank you.
Kind regards,
Rogério Paiva [Xray Support Team]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.