Hi, i m trying to import my cucumber featre files to xray using the xray REST API v2. the story is already created and the test set is created as well . i expect to update or create tests for my requirement and assign the test to the right test set
1) api used:
curl -H "Content-Type: multipart/form-data" -X POST -H "Authorization: Bearer $token" -F 'file=@1_TR-2916.feature' https://xray.cloud.xpand-it.com/api/v2/import/feature?projectKey=TR
message received :
{"errors":[],"updatedOrCreatedTests":[{"id":"131590","key":"TR-5187","self":"https://mycompy.atlassian.net/rest/api/2/issue/131590"}],"updatedOrCreatedPreconditions":[]}
2) feature file content to be imported :
@REQ Tech Team_TR-2916
Feature: Admin can configure timecard management settings at company level
@test_TR-5187 @TESTSET_TR-471
Scenario: one-Admin updates sort Time Cards to Ascending Employee Last Name
When Login as default user admin_homer
When Update sort by to EMPLOYEE_LAST_NAME and sort order to ASCENDING in timecard settings
Then User should see updated sort by as EMPLOYEE_LAST_NAME and sort order as ASCENDING in timecard settings
@TESTSET_TR-4719
Scenario: two-Admin updates sort Time Cards to Descending Employee Last Name
When Login as default user admin_homer
When Update sort by to EMPLOYEE_LAST_NAME and sort order to DESCENDING in timecard settings
Then User should see updated sort by as EMPLOYEE_LAST_NAME and sort order as DESCENDING in timecard settings
expected results:
1) TR-5187 updated and linked to testset TR-4719 and tests TR-2916
2) new test created and linked to testset TR-4719 and tests TR-2916
Actual results:
1) TR-5187 got updated but not linked to testset TR-4719 however a label of TESTSET_TR-4719 is assigned instead
2) the new test is not created at all
any advice ?
thank you
The behavior you have described is the current behavior of the feature in Xray, and you may confirm this in the product's documentation here:
"Each .feature file will be processed and will try to find or create a Test/Pre-Condition inside the project given in the projectKey parameter."
So it only works for Test cases and Pre-Conditions.
Kind regards,
Rogério Paiva [Xray Support Team]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.