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
{
"testExecutionKey": "PROJ-5595",
"tests": [
{
"testKey": "PROJ-5414",
"testInfo": {
"name": "testA"
}
},
{
"testKey": "PROJ-5415",
"testInfo": {
"name": "testB"
}
}
]
}
Here is my results file:
results.xml
<?xml version='1.0' encoding='UTF-8'?>
<testsuites name='UITests.xctest' tests='5' failures='5'>
<testsuite name='UITests.AccessibilityTests' tests='5' failures='5'>
<testcase classname='UITests.AccessibilityTests' name='testA'>
</testcase>
<testcase classname='UITests.AccessibilityTests' name='testB'>
</testcase>
</testsuite>
</testsuites>