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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the exact same problem. I guess it is correct to write https:// and not http:// as stated in the documentation:
using http:// doesn't do anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.