我正在尝试将 JUnittest xml 文件从 Jenkins 的测试管道发送到 Jira Server 上的 [Zephyr Scale Plugin][1]。我已经使用连接信息正确配置了 Jenkins 并测试了连接。
在 Post 操作中,我使用了以下配置来发布 XML 结果:
publishTestResults serverAddress: 'https://jira.me.local/',
projectKey: 'GW',
format: 'JUnit XML Result File',
filePath: 'junitresult.xml',
autoCreateTestCases: false
我收到以下错误:
[Zephyr Scale] [INFO] Publishing test results...
[Zephyr Scale] [ERROR] There was an error while publishing test results to Zephyr Scale and they were not sent. Error details:
[Pipeline] }
[Pipeline] // dir
[Pipeline] }
[Pipeline] // script
Error when executing fixed post condition:
java.lang.RuntimeException: Not implemented for Zephyr Scale Server/DC
at com.adaptavist.tm4j.jenkins.extensions.JiraInstance.publishJUnitFormatBuildResult(JiraInstance.java:99)
at com.adaptavist.tm4j.jenkins.http.Tm4jJiraRestClient.uploadJUnitXmlResultFile(Tm4jJiraRestClient.java:79)
at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.uploadResultsFile(TestResultPublisher.java:140)
at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.validateFieldsAndUploadResults(TestResultPublisher.java:115)
at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.publishResults(TestResultPublisher.java:94)
Caused: java.lang.RuntimeException
at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.handlePublishException(TestResultPublisher.java:106)
at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.publishResults(TestResultPublisher.java:96)
at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.perform(TestResultPublisher.java:85)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:100)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:70)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
我尝试将 XML 文件转换为 json 并使用自定义格式,但它给了我
{"errorMessages": ["Invalid Custom Format JSON file"]}
有人有想法吗?