Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to import feature file steps without changing description of test ticket?

Alwin Hughes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 4, 2025

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

1 answer

0 votes
Francisco Fonseca _Xray_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2025

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

Alwin Hughes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2025

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

 

Suggest an answer

Log in or Sign up to answer