将Testim Junit xml导入到Xray失败,并显示消息Error creating issues in Jira

dvtswwa3  于 2023-08-05  发布在  其他
关注(0)|答案(1)|浏览(160)

我试图导入JUnit XML生成通过Testim与Jenkins和收到以下错误。

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!"}

字符串
以下是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>


Jenkins Pipeline

X射线结果上传步骤

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'])
    };


我在Jira云中使用Xray,结果上传工作正常,使用相同的Xray服务器示例,使用Cypress Cucumber JSON凭证。
寻找一个解决方案,以上传执行报告与新的X射线Jira票

tyky79it

tyky79it1#

在添加带有test key的properties标记后,我可以将结果从JUnitXML上传到Xray,如下所示。

<?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>

字符串
由于XML没有提供到正在运行的测试用例的链接,我假设Xray拒绝了它。我目前正在尝试将这个标记从Testim端添加到JUnit XML中。


的数据

相关问题