<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: List of latest test runs per test case (Thread)</title><description> Hi folks  I would like the have a table with the latest test runs for each test case. Can someone help me with a ESQL query? </description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spirateam/reports/2591.aspx</link><item><guid isPermaLink="false">threadId=2591</guid><author>Pierre Legér (matthias.zurbruegg@gilgends.com)</author><title>List of latest test runs per test case</title><description> Hi folks  I would like the have a table with the latest test runs for each test case. Can someone help me with a ESQL query? </description><pubDate>Fri, 25 Mar 2022 07:20:53 -0400</pubDate><a10:updated>2025-08-06T13:00:32-04:00</a10:updated><link>/Support/Forum/spirateam/reports/2591.aspx</link></item><item><guid isPermaLink="false">messageId=5626</guid><author>David J (adam.sandman+support@inflectra.com)</author><title> Hi Pierre  If you want all the test runs, with test case and execution date, something like:   sele</title><description> Hi Pierre  If you want all the test runs, with test case and execution date, something like:   select TR.TEST_CASE_ID, TR.NAME as TEST_CASE_NAME, TR.RELEASE_ID, TR.RELEASE_VERSION_NUMBER, TR.EXECUTION_STATUS_NAME, TR.TESTER_NAME, TR.END_DATE
from SpiraTestEntities.R_TestRuns as TR
where TR.PROJECT_ID = ${ProjectId} and TR.EXECUTION_STATUS_ID   3
order by TR.END_DATE desc   If you want it grouped by test case, then something like:   select TR.TEST_CASE_ID, TR.NAME as TEST_CASE_NAME, TR.RELEASE_ID, TR.RELEASE_VERSION_NUMBER, TR.EXECUTION_STATUS_NAME, TR.TESTER_NAME, TR.END_DATE
from SpiraTestEntities.R_TestRuns as TR inner join

(select TR.TEST_CASE_ID, max(TR.END_DATE) as LAST_EXECUTION
from SpiraTestEntities.R_TestRuns as TR
where TR.PROJECT_ID = ${ProjectId} and TR.EXECUTION_STATUS_ID   3
group by TR.TEST_CASE_ID) as GR on TR.TEST_CASE_ID = GR.TEST_CASE_ID and TR.END_DATE = GR.LAST_EXECUTION

where TR.PROJECT_ID = ${ProjectId} and TR.EXECUTION_STATUS_ID   3
order by TR.END_DATE desc   Regards David </description><pubDate>Sun, 27 Mar 2022 12:49:00 -0400</pubDate><a10:updated>2022-03-27T12:49:00-04:00</a10:updated><link>/Support/Forum/spirateam/reports/2591.aspx#reply5626</link></item><item><guid isPermaLink="false">messageId=5627</guid><author>Pierre Legér (matthias.zurbruegg@gilgends.com)</author><title> Hi David  Thank you for your reply. It seems that your second example does exactly what i need.  Fo</title><description> Hi David  Thank you for your reply. It seems that your second example does exactly what i need.  For my understanding: What is the meaning of TR.EXECUTION_STATUS_ID   3 </description><pubDate>Wed, 30 Mar 2022 10:49:06 -0400</pubDate><a10:updated>2022-03-30T10:49:06-04:00</a10:updated><link>/Support/Forum/spirateam/reports/2591.aspx#reply5627</link></item><item><guid isPermaLink="false">messageId=7350</guid><author>Victoria D (nino.diasamidze@inflectra.com)</author><title> Hello,  This condition filters the test runs that have a status, since TR.EXECUTION_STATUS_ID = 3 w</title><description> Hello,  This condition filters the test runs that have a status, since TR.EXECUTION_STATUS_ID = 3 will pull items that have status NOT RUN.  Basically saying, TR.EXECUTION_STATUS_ID   3 filters all test runs that have an execution status other than NOT RUN (  means  not equal to ).     Regards, Victoria - </description><pubDate>Wed, 06 Aug 2025 13:00:32 -0400</pubDate><a10:updated>2025-08-25T13:19:17-04:00</a10:updated><link>/Support/Forum/spirateam/reports/2591.aspx#reply7350</link></item></channel></rss>