Showing results for 
Search instead for 
Do you mean 

Tech Tips & Tricks: Test Run-to-Test Case Coverage

by Siemens Dreamer Siemens Dreamer on ‎06-25-2014 10:31 PM

Welcome to another installment in our series of tips and tricks from the Polarion Software Technical Support team, in which we share solutions we provided to customers for real-world use cases that. The same tips might help you too, or others on your team. Today's post is a quickie: easy reporting on Test Run - Test Case coverage using SQL.

Use Case

You want to trace Test Cases to Test Runs. Specifically, you need to identify Test Cases that are not included in Test Runs at any given time.

Solution

As with the last several posts, we find that Lucene, while fine for many querying needs, doesn't deliver information like this... at least not in a way the doesn't tax the system too much. Here's some Wiki page mark-up you can use to find your Test Cases that are not part of any Test Run.
1 Test Cases Not Included in Test Runs

1 Query
#set($myQuery = "SELECT test.C_PK FROM WORKITEM test, PROJECT proj WHERE =>
test.FK_URI_PROJECT = proj.C_URI AND proj.C_ID = '${page.getProject()}' AND =>
test.C_TYPE = 'testcase' AND NOT EXISTS (SELECT record.* FROM =>
STRUCT_TESTRUN_RECORDS record WHERE record.FK_URI_TESTCASE = test.C_URI)")
* $myQuery

1.1 TestCases
{workitems:sqlQuery=$myQuery}

=> indicates continuation on the same line.


Jiri Jandl is a Senior Support Engineer with Polarion Software's European tech support team. He is based in Prague, Czech Republic.

Banner: It's all about solutions - Polarion Silver and Gold Support