I am running my tests in a jenkins pipeline which produces a junit xml. The xml has my test names like testA, testB etc.
I am importing this into XRAY JIRA data center version, using the REST api. This setup is working if i am trying to create a new Test Execution with the results from the xml.
But my requirement is to update my corresponding manual tests with names like 'Verify ABC, 'Verify BCD' based on the status of the tests testA, testB.
I tried to create a mapping like below:
mapping.json
curl -H "Content-Type:multipart/form-data" \
-u UN:PWD \
-F "file=@results.xml" \
-F "info=@mapping.json" \
'https://jira.abc.com/rest/raven/1.0/import/execution/junit?testExecKey=PROJ-5595
> This creates new tests
curl -H "Content-Type:multipart/form-data" \
-u UN:PWD \
-F "file=@results.xml" \
-F "info=@mapping.json" \
'https://jira.abc.com/rest/raven/1.0/import/execution/junit/multipart'
> This throws an error:
Error assembling issue data: project is required
Hi @AlterEgo
Have you tried adding the projectKey to the mapping file?
- endpoint: POST /rest/raven/1.0/import/execution/junit/multipart
- Add projectKey to the mapping.json
{
"testExecutionKey": "PROJ-5595",
"projectKey": "PROJ",
"tests": [
{
"testKey": "PROJ-5414",
"testInfo": {
"name": "testA"
}
},
...
]
}
Thank you for the suggestion, unfortunately it didnt help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @AlterEgo , welcome to the Atlassian Community and thanks for your question.
I just wanted to signpost to the product documentation for this https://docs.getxray.app/display/XRAY/Import+Execution+Results+-+REST if it can be helpful.
Best wishes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes i am using this as my reference. But it doesnt have a lot of examples. I think there is only 1 or 2. Particularly it doesnt cover the scenario of updating an existing test execution using the multipart endpoint.
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.