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 youJoao
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+-+RESTI was able to authenticate and generate a token which I used to update my tests. This ticket can be closed.Thank youJoao
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
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.
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
It looks like you're new here. Sign in or register to get started.