i would like to import the results of the execution on an existing test plan but each time in a new test execution i have the below on jenkings
stage("Publish XRay Results to JIRA") {
// publish results to Jira only when parameter results is set to true
when {
expression { return params.PUBLISH_TO_JIRA == true }
}
steps {
script {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
//SEARCH ALL cucumber.json files and publish them one by one
archiveArtifacts artifacts: '**/target/cucumber*.json', fingerprint: true
for (file in findFiles(glob: '**/target/cucumber*.json')) {
if ( file.getLength() < 6 ) {
echo "[ INFO ] File ${file} is too small, will not be uploaded."
}
else {
echo "[ INFO ] Uploading file ${file}."
step([$class: 'XrayImportBuilder',
serverInstance: "${pipelineConfig.jira_server_id}",
endpointName: '/cucumber',
importFilePath: "${file}"])
}
}
}
}
}
}
}
and in the feature file, I specify the id of the existing test execution it works correctly adding the result to the existing test execution.
if I specify the ids of the test plan I take the error :
23:19:54 ERROR: Unable to confirm Result of the upload..... Upload Failed! Status:400 Response:{"error":"description: description"}
I have tried without TPL-XXX and with TPL-XXX but the results it the same.
so my question is :
how I can import test execution results using endpointName: '/cucumber', on a new Test Execution under an existing test plan?