jenkinsci / xray-connector-plugin

Xray Test Management Connector for Jenkins
https://plugins.jenkins.io/xray-connector/
MIT License
16 stars 13 forks source link

Impossible to update Test Exec with Xray #37

Closed bluepioupiou closed 3 years ago

bluepioupiou commented 3 years ago

Hi, thanks for this plugin. I have some troubles to make it work.

I generate a json file with Xray result. When I use CURL or Postman and try to upload it, it's a success. But when I use the plugin, I got an error :

ERROR: Unable to confirm Result of the upload..... Upload Failed! Status:400 Response:{"error":"Exécution des Tests CTL-XXX n\u0027a pas été retrouvé."}

And my CTL-XXX is an existing ticket that I can update through CURL or Postman. I use credentials for my jira instance...

my plugin configuration :

step([$class: 'XrayImportBuilder', endpointName: '', importFilePath: 'xray.json', serverInstance: 'MyServerInstance'])

What did I do wrong ? Thanks

Russell616 commented 3 years ago

Hi @bluepioupiou

Thank you for using the Xray connector plugin!

it seems that your step() is missing some mandatory fields, please take a look at this example (adapted from our documentation):

step([$class: 'XrayImportBuilder', endpointName: '/junit', importFilePath: 'java-junit-calc/target/surefire-reports/*.xml', importToSameExecution: 'false', projectKey: 'CALC', serverInstance: '552d0cb6-6f8d-48ba-bbad-50e94f39b722'])

You must have at least the following inputs defined: the endpoint name, the relative/absolute filepath to the result file and the projectKey.

For a more personalized support, I suggest you to contact our support team.