How to bulk update Test cases failed/Blocked by one Defect in JIRA using XRAY

Ashok Ramachandran July 22, 2021

Hi Folks, 

Need your help! In one of my project, test case execution failed due to one defect - DEF-XXXX and I would like to FAIL/BLOCK 150 test cases at a stretch using a bulk update/FAIL/Block option. Is there any way to this? 

We mainly face this issue when Automation batch run occurs and single defect fails all those 150 test cases but we are unable to link all of them at once. Linking with every test cases manually is a time consuming task and hence I need your suggestion to go about this.

Thanks in advance

Note: I know we can update the status, Assignee, etc using Tools>Bulk Update option. But I am unable to find linking with a defect when doing bulk test case update. Please help

1 answer

0 votes
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.
July 28, 2021

Hi @Ashok Ramachandran 

This should only be possible using REST API (https://docs.getxray.app/display/XRAY/Test+Runs+-+REST).

Since the status of the execution of a Test is stored in the Test Run.

The Test Run is the "child" of a Test and a Test Execution, and although the Test and Test Executions are both Jira issues, the Test Run is not.

This happens because you can execute the same Test in multiple Test Executions, so it is necessary to keep track of each execution of a Test in each Test Execution.

With the REST API, you would need to get the list of Test Run IDs, from the Test (https://docs.getxray.app/display/XRAY/Tests+-+REST#TestsREST-ExportingTestRuns) or from the Test Execution (https://docs.getxray.app/display/XRAY/Test+Executions+-+REST), and once you have the Test Run, you can use the REST API (link above) to change specific Test Run status, that will affect the final Test status.

It will require a few REST API executions and probably some scripting code to fully automate this.

Thank you.

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

Suggest an answer

Log in or Sign up to answer