We use Jenkins XRay Plugin to import test results to JIRA XRay project:
step([$class: 'XrayImportBuilder',
endpointName: '/junit',
importFilePath: '**/source/Tests/TestResults/*.xml',
importToSameExecution: 'true',
projectKey: 'TST',
serverInstance: 'nnn',
testEnvironments: 'QA'
])
It worked for our initial project but later we decided to create another XRay project with key 'TST'
Now it gives the following error and I do not know what it means:
Starting to import results from test.xmlError when executing always post condition:
hudson.AbortException: Unable to confirm Result of the upload..... Upload Failed! Status:400 Response:{"error":"Project Key and Summary are required to create a new Test"}
at com.xpandit.plugins.xrayjenkins.task.XrayImportBuilder.tryUploadResults(XrayImportBuilder.java:828)
at com.xpandit.plugins.xrayjenkins.task.XrayImportBuilder.uploadResults(XrayImportBuilder.java:699)
at com.xpandit.plugins.xrayjenkins.task.XrayImportBuilder.importResultsSequential(XrayImportBuilder.java:600)
at com.xpandit.plugins.xrayjenkins.task.XrayImportBuilder.perform(XrayImportBuilder.java:571)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
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(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
It looks like some difference in project configuration but I cannot find it. Google does not help as well.
The error message says it needs to have both the Project Key and the Summary set up.
Since the Project Key is set up in the Jenkins pipeline, it should be the summary.
In Xray, there are two ways to set the Summary, explicitly or implicitly.
Explicitly: by using the property "test_summary".
Implicitly: by using the value of the attribute "name" on the "testcase" element of the JUnit report.
Please check this documentation page for additional details: https://docs.getxray.app/display/XRAYCLOUD/Taking+advantage+of+JUnit+XML+reports#TakingadvantageofJUnitXMLreports-Testsummary
Since I assume that you might not be using the property, it should be the attribute "name" that is missing from the JUnit report.
Please check your JUnit report and check this.
If you need further help, please contact Xray Support (http://Xraysupport.getXray.app).
Thank you.
Kind regards,
Rogerio Paiva [Xray Support Team]
Can you please elaborate the steps/procedure to set the summary either way(Explicitly or Implicitly).
The shared documents, didn't helped.
Thank you,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.