Finding TestCases which are not contained in a TestRun

Description
fml
Posts: 10
Joined: Tue Jul 31, 2018 1:03 pm

Finding TestCases which are not contained in a TestRun

Postby fml » Mon Jun 24, 2019 12:32 pm

Hi there,

does anyone know a smart posibility to find all TestCases which are not contained in any TestRun?
It would be nice if there would be a possibility to create a LiveReport with a Table-Block Widget, showing all relevant TestCases.

Best reards
fml

fbachmann
Posts: 48
Joined: Thu Apr 24, 2014 12:10 pm

Re: Finding TestCases which are not contained in a TestRun

Postby fbachmann » Mon Jun 24, 2019 3:32 pm

Not smart, but a first-idea-from-the-top-of-my-head:

1) going through all test runs (make sure you have restrictive selection criteria, eg. Polarion project), compile a list of all Test Case IDs who are referenced in at least one test run
2) use that list for a "NOT IN ( <list of IDs>) query, using the same selection criteria

Open to improvement ideas...
François

PatrickClaus
Posts: 19
Joined: Thu Jan 18, 2018 11:02 am
Location: Frauenauracher Str. 85, 91056 Erlangen

Re: Finding TestCases which are not contained in a TestRun

Postby PatrickClaus » Tue Jul 02, 2019 2:39 pm

Quick and Dirty

On a LiveReport Page in a Script Block, I have tried the following:

Code: Select all

#set($workItemList = $trackerService.queryWorkItems("project.id:(YOUR-PROJECT-ID) AND type:YOUR-TEST-CASE-ID", "id"))
#set($testRunList = $testManagementService.searchTestRuns("project.id:(YOUR-PROJECT-ID)", "id",9999))
#set($notFoundList = [])

Work Item List Size: $workItemList.size<br>
Test Run List Size: $testRunList.size<br>

#foreach($workItem in $workItemList)
  #set($notfoundResult = true)
  #foreach($testRun in $testRunList)
    #if($testRun.getAllRecordsForTestCase($workItem).size > 0)
      #set($notfoundResult = false)
    #end
  #end
  #if($notfoundResult)
    #set($!void = $notFoundList.add($workItem)) 
  #end
#end

Result Size: $notFoundList.size<br>

<table>
<th>No results found:</th>
#foreach($workItem in $notFoundList)
  <tr><td>$transaction.workItems.getBy.ids("YOUR-PROJECT-ID","$workItem.getId").render.withTitle.withLinks<br></td></tr>
#end
</table>


Replace project ID and test Case ID with your specifics.

This will find all testCases specified by query which do not offer any results for method ITestRun.getAllRecordsForTestCase. See here: https://almdemo.polarion.com/polarion/s ... stRun.html

Use this at your own risk. Solution is inefficient and might take a long time.
Best Regards,
Patrick Claus

External service provider at Valeo Siemens eAutomotive GmbH
Frauenauracher Str. 85
91056 Erlangen, Germany
Mail Address

fml
Posts: 10
Joined: Tue Jul 31, 2018 1:03 pm

Re: Finding TestCases which are not contained in a TestRun

Postby fml » Fri Jul 12, 2019 7:56 am

Dear Patrick,
thank you very much for the example; I tried it and it works very well! :D

Hope that also other guys in this forum find this helpful.

Thank you again and best regards
Markus

poojarane
Posts: 1
Joined: Mon Jul 29, 2019 5:46 am
Contact:

Re: Finding TestCases which are not contained in a TestRun

Postby poojarane » Mon Jul 29, 2019 6:13 am

Great Information.Thanks for sharing :)


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 8 guests