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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,559,638
Community Members
 
Community Events
185
Community Groups

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

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.

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.

Raghavendra Patlolla
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!
May 18, 2023 • edited May 19, 2023

I am facing the same issue. Importing the file manually in Jira works but trying with the REST API gives me 404. Any idea how to resolve this issue? @Joao Campos @Kirsten Langendorf 

Suggest an answer

Log in or Sign up to answer