'Integration of Jenkins with Xray with the help of Jenkinsfile

I am getting this issue on the integration of Jenkins with Xray using Jenkinsfile. Error:-

Unable to confirm Result of the upload..... Upload Failed! Status:400 Response:{"error":"Error assembling issue data: project is required"}.

Does anyone have an idea about this issue and how to resolve it?



Solution 1:[1]

The issue is because you are using the endpointName: '/cucumber/multipart', when using this endpoint Xray expects either:

  • One file with the test results in json format and a second json configuration file where you configure other values (use inputInfoSwitcher: filePath and importInfo: <file_path>)
  • One file with the test results in json format and a json text with the extra configurations you want to pass to Xray ((use inputInfoSwitcher: fileContent and importInfo: <json_text>)

Notice that if the values of the configuration file or the json text are not correct they will not be used.

In the above case it seems that you are not correctly replacing the values in the json text.

You can find more info here: https://docs.getxray.app/display/XRAY/Integration+with+Jenkins#IntegrationwithJenkins-Pipelineprojectssupport

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Cristiano Cunha