How to Retrieve Call Test References for a Specific Test in Xray Cloud?

Huzaifa Ahmed July 11, 2024

Hi everyone,

I'm working on a project where I need to retrieve the call test references for a specific test case in Xray Cloud. I've been using the getExpandedTest GraphQL query with the fields calledTestIssueId and parentTestIssueId, but it doesn't seem to provide the correct call test references.

 

Screenshot 2024-07-11 at 5.42.01 PM.pngScreenshot 2024-07-11 at 5.43.35 PM.png


I have noticed that on UI it uses this internal endpoint, and it returns the correct references. But as this is an internal endpoint, I am assuming it's not accessible.

Does anyone know of a reliable way to fetch the call test references for a specific test case? Is there a specific endpoint or query that I should be using for this purpose?


Any help or guidance would be greatly appreciated!

Thanks in advance!

2 answers

0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 5, 2024

Hi @Huzaifa Ahmed 

unfortunately I do have several (older) profiles in the community and as the mention in your question points to another profile i didn´t get any notification.

Luckily I stumbled over this question anyways :D

so....so get it right:

Let´s say we have a testcase TC-1. This testcase is called within 2 other testcases (TC-2 and TC-3).

Your requirement is that you would like to query the usage of TC-1 - so doing a query on TC-1 that returns TC-2 and TC-3 (as TC-1 is called there).

 

Did I get that wright?

 

Best
Stefan

Huzaifa Ahmed August 5, 2024

Hi @Stefan Salzl 

Thank you for your response, yes you got the scenario correct. On UI Xray has internal api call `call-test-references` which returns this information.

0 votes
Huzaifa Ahmed July 11, 2024

Hi @Stefan Salzl

I would really appreciate your suggestion on a workaround for this flow. My use case is to determine where this test is being called from (all of it's parent tests).

Thank you!

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 5, 2024

Hi @Huzaifa Ahmed 

I guess I understood it the same way than you did:

I tried to get the "expandedStep" via method "getExpandedTest". As described in the documentation (according to my logic) I expected the "parentTestIssueId" to deliver this result - which it does not :(

As this is a problem in a 3rd party app and I can´t see any other option to solve this - would you mind raising a ticket at vendor´s support page?

Best
Stefan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events