Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

xray test case import using REST api v2 Edited

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_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

1 answer

Hi @Mounir Youssef 

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]

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you