You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
sample_test1.feature -
Feature: Sample feature1
@test_jiraID-123
@label_sampleFeature1
Scenario: Testing1
When the Component is a TEST
@test_jiraID-456
@label_sampleFeature1
Scenario: Testing2
When the Component is a TEST
sample_test2.feature -
Feature: Sample feature2
@test_jiraID-789
@label_sampleFeature2
Scenario: Testing3
When the Component is a TEST
Radish command -
radish --cucumber-json=sample_test.json --junit-xml=xmlreport/sample_test1.xml sample_test1.feature -b test/
radish --cucumber-json=sample2_test.json --junit-xml=xmlreport/sample_test2.xml sample_test2.feature -b test/
the output of the above command will create two XML files:
ls xmlreport/
sample_test1.xml
sample_test2.xml
I have a stage in Jenkins - which does this -
stage('Import results to Xray') {
steps {
step([$class: 'XrayImportBuilder', endpointName: '/junit/multipart', importFilePath: 'xmlreport/*.xml', credentialId: "${JIRA_USER_ID}", projectKey: 'TEST', serverInstance: '<myserver>', testEnvironments: 'TEST', importToSameExecution: "true", importInParallel: "false", importInfo: 'Jenkins/XrayTestExecutionImportInfo.json', testImportInfo: 'Jenkins/XrayTestImportInfo.json', inputInfoSwitcher: 'filePath', inputTestInfoSwitcher: 'filePath' ])
}
}
XrayTestImportInfo.json :
{
"fields": {
"description": "Automated Test",
"labels": [
"Testing",
"Automation"
]
}
}
Output of Jenkins Console:
Successfully imported JUnit XML multipart results from sample_test1.xml
Successfully imported JUnit XML results from sample_test2.xml
I see that all the jira IDs present in sample_test1.xml (jiraID-123,jiraID-456) are updated with the contents in XrayTestImportInfo.json. But, the jira IDs in sample_test2.xml (jiraID-789) do not get updated.
I have also tried:
curl -H "Content-Type: multipart/form-data" -F "file1=@sample_test1.xml
" -F "file2=@sample_test2.xml
" -u user:pass -F "info=@XrayTestExecutionImportInfo.json
" -F "testInfo=@XrayTestImportInfo.json" https://<sever>/junit/multipart
{"error": "The results file is required."}