Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need a JQL for Defects associated with failed Tests

Garden16_ December 5, 2023

I currently have a JQL query  issue in testExecutionTests(ABC -333) AND TestRunStatus in (FAIL, PASS, TODO, EXECUTING, ABORTED) that displays All the Tests and their Test run status .I would like to query defects associated with the failed Tests. When we execute the Test , we add a defect , we associate the failed test with a defect. However I am not able to query in way that a defect is displayed for the failed test.

 

When I run the query I have Key, Test summary, Test status , Test run status , Affected version, Assignee,

I would like to add Defect column for those with Testrunstatus as failed. How do I query for the defects

 

 

1 answer

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 1, 2024

Hi @Garden16_

Could you please clarify if there is a custom field that displays the defects? If yes, you could try to include the result shown from that field as a filter to your JQL Query.

I am looking forward to your feedback and clarification.

Thank you and Kind regards,

Ram

Garden16_ January 1, 2024

Happy New Year Ram !

There is no custom felids that I am using 

 

issue in testExecutionTests(A2-500) AND TestRunStatus in (FAIL, PASS, TODO, EXECUTING, ABORTED)

This query  gives list of Tests that have passed or failed 

However , I also need a list of defects that are associated with failed Tests in the execution. I would also like to display  one more column in the screen shot below that depicts the defects associated with the failed test case

Test passfail as per Test execution.PNG

Garden16_ January 1, 2024

The failed test 529 above screen shot has 3 defects associated with it. defects associated with tests.PNGOut of them two are closed. I have used linked issue to create defects with the test .See below 

Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 2, 2024

Hi @Garden16_

In your last comment, you mentioned:-

However , I also need a list of defects that are associated with failed Tests in the execution. I would also like to display  one more column in the screen shot below that depicts the defects associated with the failed test case

Does the list of defects have a specific field for it?

If yes, are you able to include the field that you want to see using the Columns list as shown in the screenshot below:-

image1.png

I am looking forward to your feedback and clarification.

Thank you and Kind regards,

Ram

Garden16_ January 4, 2024

The list of defects does not have any specific field for it. Let's say of I link the defect to the Test. when I added Column 'link.'  It shows the defects as well as other issue types linked to the test.

How do I exclusively show only defects that are linked to the Test. Show only defects (open defects) linked to the Test. Please advise.

Suggest an answer

Log in or Sign up to answer