Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,407
Community Members
 
Community Events
168
Community Groups

XRay Cucumber Test Case API overwriting manual test cases

I'm using this endpoint /rest/raven/1.0/import/feature?projectKey={{projectKey}} to create and update cucumber test cases, following the documentation here https://docs.getxray.app/display/XRAY/Importing+Cucumber+Tests+-+REST

 

In our project we have a combination of manual and cucumber tests, often a manual test and cucumber test will test the same functionality so they will have the same name. An issue we're seeing is if a manual test is created and we attempt to upload a new cucumber test case via the api with the same name, the manual test is being overwritten with the details of the cucumber test. Our cucumber test cases are identified using the @id tag, not the test case id.

 

The logic of selecting which test case to update in this api is documented as follows:

  1. try to find the Test by key, if found then update it; else...
  2. try to find the Test having:
    1. a label with the original relative path of .feature (e.g. "core/sample_addition.feature)
    2. a label named "id:xxx", where xxx is some number (e.g. "id:1", "id:32"); this label comes from a scenario/scenario outline's tag
    3. no other label ending in ".feature"
  3. try to find the Test having:
    1. a label with the original relative path of .feature (e.g. "core/sample_addition.feature)
    2. the same summary
    3. no other label ending in ".feature"
  4. try to find the Test having:
    1. the same Summary
    2. no label ending in ".feature", except the one corresponding to the relative path of the Cucumber file being imported
  5. create Test in that project and add a label with the relative path of the feature. The tags used in the scenario/scenario outline are also added as labels.

 

I believe that we should be hitting option 5 to create a new test case but the api seems to be identifying a manual test with the same summary, can anyone provide insight into this? is it a bug?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events