I'm trying to import JUnit XML generated through Testim with Jenkins and received following error.
Starting XRAY: Results Import Task...
##########################################################
#### Xray is importing the execution results ####
##########################################################
File found: C:\ProgramData\Jenkins\.jenkins\workspace\TestimTestPro\testim-tests-report.xml
Starting to import results from testim-tests-report.xml
ERROR: Step ‘Xray: Results Import Task’ failed: Unable to confirm Result of the upload..... Upload Failed! Status:400 Response:{"error":"Error creating issues in Jira!"}
Following is the XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testsuites>
<testsuite name="selenium run" tests="1" failure="0" timestamp="2023-06-30T04:52:26.555Z" skipped="0" failure-evaluating="0">
<testcase name="test1" classname="testim.io.test" time="123.758" ownedBy="Staysure Automation" ownerEmail="automationteam@staysure.co.uk">
<system-out>https://app.testim.io/#/project/9GScCUXVSOmXaUeDNvKA/branch/master/test/0gEraRql06D0MQdm?result-id=mCda0xgIGFUtfn2f</system-out>
</testcase>
</testsuite>
</testsuites>
Xray results upload step
stage('Upload xray test results') {
step([$class: 'XrayImportBuilder', endpointName: '/junit', importFilePath: 'testim-tests-report.xml', importInParallel: 'false', importToSameExecution: 'false', projectKey: 'SPT', serverInstance: '<<<<CLOUD>>>>', testExecKey: 'SPT-3082', testPlanKey: 'SPT-3081'])
};
I'm using Xray in Jira cloud and results uploading is working fine with same xray serverInstance with credentials for cypress cucumber json.
Looking for a solution to upload the execution report with new Xray Jira ticket
Apologies for the very late reply. I think Testim now support Xray out of the box. It should work flawlessly once you complete integration with required parameters such as: Jira username, Jira API token, XRay client ID, XRay client secret, URL.
Please refer to the screenshot and documentation below.