I've been following the documentation here:
https://docs.getxray.app/display/XRAY/Importing+Cucumber+Tests+-+REST
For uploading feature files to jira from my terminal.
I'm running something like:
curl -H "Content-Type: multipart/form-data" -X POST -H "Authorization: Bearer $JIRA_ACCESS_TOKEN" \ -F "file=@$TEST_DIR/pending_feat_uploads.zip" \ -F "testInfo=@$TEST_DIR/test_info.json" \ "https://jira.<my-company>.com/rest/raven/1.0/import/feature?projectKey=<project_key>" \ -o "$TEST_DIR/upload_status.json"
with the test_info.json file looking like:
{
"fields": {
"customfield_10600": {
"value":"Cucumber"
},
"customfield_14701": [
{ "value":"Level 3 - Software In Loop" }
],
"customfield_16112": {
"value":"Specification Based",
"child": {
"value":"Scenario Based Testing",
"children": [
{
"value": "Scenario Based Testing",
"children": [
{ "value":"Scenario Based Testing" }
]
}
]
}
},
"customfield_16113": { "value":"Functional Test" },
"customfield_21704": { "value":"Yes" }
}
}
And while the feature file steps are being uploaded correctly and I get a successful response back from jira listing the tests that have been updated it always seems to wipe the description, as if "description": "" is specified in the test_info.json file. There doesn't seem to be a way to specify the description in the feature file to be uploaded.
I can specify the description in the test_info.json file but this obviously isn't very useful for uploading tests in bulk.
The only work around I can think of is to use the jira api to pull the description from jira for each test, edit the description field in test_info.json then upload the test for each test individually.
Supplying -F "updateTests=true" in the curl command also doesn't seem to help.
The ideal case for me would be for this upload operation to just not update the description if the field isn't provided.
Edit: just realised I put the wrong url in the curl command in the question
Hi @Alwin Hughes ,
Welcome to the community!
Based on your "edit" I'd assume it's resolved, nonetheless, and for future endeavours you might have, feel free to reach our support here.
We can help you with these questions as well.
Best, Francisco
Hi Francisco,
Thanks for your reply
Unfortunately it's not resolved. The behaviour I described was accurate I just pasted the wrong url.
I will contact support.
Regards,
Alwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.