query xray for test by testplan key

israel sanay October 24, 2021

Hi, im trying to requests all tests associated with a test plan by testplan key.

im making the request to http://yourserver/rest/raven/1.0/api/testplan/TEST-123/test 

like the documentation here (https://docs.getxray.app/display/XRAY/Test+Plans+-+REST) suggests but im getting :

<pre>Cannot GET /rest/raven/1.0/api/testplan/TEST-123/test</pre>

 

thanks in advance.

1 answer

1 accepted

0 votes
Answer accepted
Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 28, 2021

Hi @israel sanay 

It should be because you are using Xray DC-Server REST API on an Xray Cloud instance.

Xray DC-Server and Cloud are two different apps, and so it is essential to use the correct documentation, since features are different, due to differences in their architecture.

In Xray Cloud you need to use GraphQL API, please check the Xray Cloud documentation (https://docs.getxray.app/display/XRAYCLOUD/GraphQL+API), and GraphQL query getTestPlan here: https://xray.cloud.getxray.app/doc/graphql/gettestplan.doc.html. And please check also the examples.

Note, that this query uses issue ID, so you need first to get the ID for a given Issue Key using this query getTestPlans (with JQL): https://xray.cloud.getxray.app/doc/graphql/gettestplans.doc.html

The query names are very similar, the first is singular, and the second is plural, ensure to use the correct one. The plural to get the ID from the Key and the singular to get the details based on the ID.

Any additional questions, please get in touch with Xray Support (http://xraysupport.getxray.app); we would gladly assist you.

Thank you.

Kind regards,
Rogério Paiva [Xray Support Team]

israel sanay October 28, 2021

Hi @Rogério Paiva - Xray Xporter ,

Thank you for the thorough answer, I noticed I was viewing the wrong documentation the day I asked the question but wasn't able to delete my post, sorry about that.

 

Thanks again!!

Suggest an answer

Log in or Sign up to answer