I have created the XRAY Test execution and inside this I have added the test cases.
Now I have marked the test cases failed or pass according to the validation results.
Now I want to know the test run Id of the test cases inside the test execution, so that I can upload the screenshot to it
Hi @Sumit Tyagi
The GET /rest/raven/1.0/api/testrun?testExecKey endpoint is not supported in Xray Cloud, which instead utilizes a GraphQL API for retrieving test runs. To obtain the Test Run ID in Xray Cloud, you can use the GraphQL API with a query similar to the one provided below:
{
getTestRun(testIssueId: "33920", testExecIssueId: "33922") {
id } }
To execute this query, send a POST request to https://xray.cloud.getxray.app/api/v2/graphql, including the necessary headers such as Authorization and Content-Type.
For automating tasks like screenshot upload, bug creation, and linking in Xray Cloud, follow these steps:
First, upload the screenshot to the Test Run using the provided POST request.
Next, create a bug in Jira using the Jira Cloud REST API.
Bugs are created, and links are established as necessary.
Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards
Hi @Sumit Tyagi
You can give a try with the Xray REST API, you'll need to have the Test Execution Key, such as XT-1234.
Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Humashankar,
Thanks for the reply...
Currently am using the import/execution api t update the test result in xray.cloud api.
having below questions:
1. Do 'GET /rest/raven/1.0/api/testrun?testExecKey' this API supported with the jira.atlassian.cloud
2. am facing the below challenge. In automation....
after every test am calling the import/execution API to update the test results in the xray, then i need to upload the screenshot and create a bug in case of failure and link to the test case inside execution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.