Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Using Xray API to import cucumber test results - 404

I am trying to use the Xray REST API to update test executions for Cucumber tests.

When I run:

curl -H "Content-Type: application/json" -X POST -u username:apiToken --data @e2e/reports/results.json https://companyName.atlassian.net/rest/raven/1.0/import/execution/cucumber

 All I get is a 404 error message with this response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>404</status-code><message>null for uri: https://companyName.atlassian.net/rest/raven/1.0/import/execution/cucumber</message></status>

Could I be missing additional parameters or is my URL malformed in any way?

Thank you
Joao

3 answers

1 accepted

0 votes
Answer accepted

Resolved. Somehow I missed the updated API docs with different hostname and API endpoint available at https://confluence.xpand-it.com/display/XRAYCLOUD/Import+Execution+Results+-+REST

I was able to authenticate and generate a token which I used to update my tests. This ticket can be closed.

Thank you
Joao

Not worked still getting the 404 page 

curl -H "Content-Type: application/json" -X POST --user user@gmail.com:apitoken --data @"*****/cucumber.json" https:/******/api/v1/import/execution/cucumber

@Joao Campos  any idea how to resolve

Any luck? I am struck with the same issue now

I have the exact same problem. I guess it is correct to write https:// and not http:// as stated in the documentation:

curl -H "Content-Type: application/json" -X POST -u admin:admin --data @cucumber_output.json http://yourserver/rest/raven/1.0/import/execution/cucumber

 

using http:// doesn't do anything.

I am also getting the same response/error using the 

curl -H "Content-Type: application/json" -X POST -u username:apiToken --data @e2e/reports/results.json https://companyName.atlassian.net/rest/raven/1.0/import/execution/cucumber

If I use the referred in the answer above I get   - e.g. for exporting the all the tests in my project (=filter 10508). I have made a variable called token that contains my client id and the client secret (concatenated).

curl -H "Content-Type: application/json" -X GET -H "Authorization: Bearer $token"  "https://xray.cloud.xpand-it.com/api/v1/export/cucumber?filter=10508"                          

{"error":"No Cucumber Tests were found when exporting"}%   

Any idea how to resolve? 

Please check the tags used in the feature file.

They should be same as in the jira cloud.

For example: if you created a test type with jira key id TEST123, and you are tagging as TEST_123 in the feature file, this error can occur.

Try to remove all special characters like underscores, etc and keep limited to alphabets and numbers.

 

This way I resolved my issue.

Suggest an answer

Log in or Sign up to answer
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