Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,983
Community Members
 
Community Events
184
Community Groups

I need help with JQL query to filter out test report from Test Executions for current sprint

I need help with a JQL query that can filter out my Test Executions based on the environment they are run on a daily report basis. Also, the report needs to exclude test execution for any retest.

The query that I'm using is 

issuetype = Test AND issue in testExecutionTests('TestExecutionKey') AND updated > startOfDay() AND updated < now()

TestExecutionKey filter: 

issuetype = "Test Execution" AND project=XX AND fixVersion = vNext AND sprint in openSprints()

It returns the previous execution test run status rather than current execution, 

Can someone help me with it? any help would be appreciated.

1 answer

0 votes
JM Perrot
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.
May 10, 2023 • edited

Hello @kajaljena01 and welcome among us

I can suggest some modifications, I hope they can help you

  • remplace updated > startOfDay() by created > startOfDay()
  • Try : Project = XX AND fixversion = vNext AND issuetype = Test AND sprint in openSprints() AND created > startOfDay()
  • Check your fixversion and your issuetype

Your issue is a Test or a Test Execution ?

Hi JM, thanks for your suggestion. I replaced 'updated' with 'created' field but it returns 0 results.

The fix version is correct and if I try to fetch the report from test execution  (TestExecutionKey filter ) then report is matching but not when I use testExecutionTests(''). 

The issue type is Test, I'm trying to get a list of tests from Test execution. We have got multiple teams and multiple test executions created per sprint. We are using x-ray tool. I need to fetch test execution daily report for multiple projects with the same fix version and this should fetch first-time run tests only, excluding all retests for defects.  

JM Perrot
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.
May 10, 2023

Ok so your tickets are already created before the daily test ?

In this case I can suggest to list all your project in your query :

Project in (ABC, AZE, QWE, etc...) AND fixversion = vNext AND issuetype = Test AND sprint in openSprints() AND updated > startOfDay()

Im using a similar query to get test executions. 

Project in( X1, X,2) AND fixversion = vNext AND issuetype = Test AND sprint in openSprints() AND updated > startOfDay()

The report with Test execution is overall status and not daily basis. That's why I'm trying to get a list of tests executed on a daily basis and their status. 

Normally team creates test execution for the environment with no test on sprint planning day itself.

Also, added a label in Test to identify failed tests so that filter will exclude if it rerun.

The query filter issuetype = Test AND issue in testExecutionTests(filterId) looked ok until I spot the failed test which failed last Oct but report shows for today.  

I tried with different optional parameters for testExecutionTests but still, it didn't work. 

Is there any other query to retrieve the test list from test executions

JM Perrot
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.
May 12, 2023

Re

Did you try to replace issue in testExecutionTests('TestExecutionKey') by filter = TestExecutionKey ?

I tried with filter=TestExecutionkey but it still not working as expected.

For some unknown reason, it returned any previous execution where Test is attached to a defect, even though the defect itself has been closed already. Not picking the correct Test execution status.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events