I have added the XrayImportBuilder to my pipeline script to import JUnit test results to Xray in Jira. It actually works fine and it creates Test issues and Test Executions issues as expected.
However, the json defined in importInfo
just sets the parameters for the Test Execution issue in Jira. It does not affect the information for the Test issue:
step([$class: 'XrayImportBuilder',
endpointName: '/junit/multipart',
testPlanKey: 'CL-25466',
importFilePath: '**/target/surefire-reports/**/*.xml',
importInfo: '''{
"fields": {
"project": {
"key": "CL"
},
"components": [{
"name": "123"
}],
"summary": "Test Execution for java junit"
}
}''',
importToSameExecution: 'true',
inputInfoSwitcher: 'fileContent',
serverInstance: '123435567678123435567678123435567678'])
Is there a way to add additional field information for the Test issue, except for the standard ones like testPlanKey, fixVersion..)? I already checked the documentation for XrayImportBuilder (https://www.jenkins.io/doc/pipeline/steps/xray-connector/), but it is not well described what the parameters do in detail.