0

I'm trying to update the Summary of Xray execution in Jira while Uploading JUnit XML to Xray. But I was not able to find a parameter to add execution summary text into Xray results upload pipeline step. Is there a way to update following execution name by updating JUnit XML or by adding a parameter to Xray results upload pipeline step.

enter image description here

Xray results upload pipeline step

stage('Upload xray test results') {
     step([$class: 'XrayImportBuilder', endpointName: '/junit', importFilePath: 'testim-tests-report2.xml', importInParallel: 'false', importToSameExecution: 'false', projectKey: 'PSTT', serverInstance: 'CLOUD-0ca', testPlanKey: 'PSTT-3711'])
};

testim-tests-report2.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testsuites>
  <testsuite name="selenium run" tests="1" failure="1" timestamp="2023-06-30T07:10:08.937Z" skipped="0" failure-evaluating="0">
    <testcase name="test1" classname="testim.io.test" time="253.413" ownedBy="Staysure Automation" ownerEmail="automationteam@staysure.co.uk">
      <system-out>https://app.testim.io/#/project/9GScCUXVSOmXaUeDNvKA/branch/master/test/0gEraRql06D0MQdm?result-id=P2folrIsYwSNXOYr</system-out>
      <failure message="Step Failed: Element not found More info at: https://app.testim.io/#/project/9GScCU/branch/master/test/0gEraRql?result-id=P2folrIsY"/>
        <properties>
          <!-- using a custom "test_key" property -->
          <property name="test_key" value="SPT-4323" />
        </properties>
    </testcase>
  </testsuite>
</testsuites>
Nipuna Madusanka
  • 194
  • 2
  • 11

1 Answers1

1

If you want to change the summary you should use the multipart request that will allow you to define it in an additional file that you send to Xray.

You can find how to do so here: https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST#ImportExecutionResultsREST-JUnitXMLresultsMultipart

For more information about how to use it with Jenkins check here: https://docs.getxray.app/display/XRAYCLOUD/Integration+with+Jenkins

Cristiano Cunha
  • 381
  • 1
  • 3