Page 1 of 1

How to find (or at least count) "Waiting" test cases of a test run in Polarions PostgreSQL Database?

Posted: Mon Apr 23, 2018 1:55 pm
by ALMighty
Hello dear folks! :)

Has anyone an idea how to find "Waiting" test cases of Test Runs (see picture attached) in the database?
Or at least an idea how to count them with the help of the database?


I see no useful indicator at all in either the tables struct_testrun_records or testrun.
My first guess was "Alright, just pick the lines in struct_testrun_records where the result is null." but that is not consistent, meaning that the waiting test runs of Testrun A are listed in the database (with a Null result) but the wating test runs of testrun B are not listed at all.

As I said, counting the waiting ones (without explicitly listing them) would also be enough so far.
All I would need for that would be a overall number of test cases assigned to a test run and then deduct the number of test cases which have a result, but I could not find such an overall number.

And my last idea was to find them in the database via a Lucene query with the function lucene_query because in the UI you can find the waiting test cases with a query. However I have no clue if that can work and if yes, which parameters to give to this function.

So Any clues? I am also open for any dirty work around for solving this.
:lol:

Re: How to find (or at least count) "Waiting" test cases of a test run in Polarions PostgreSQL Database?

Posted: Fri Nov 30, 2018 9:52 am
by jaka.ivancic
Hello,

I don't know about the database, but you can get the waiting test cases by loop-checking them with method isExecuted() from the ITestRecord interface.

Code: Select all

#foreach ($t in $testcases)
   #foreach ($record in $testRun.getAllRecordsForTestCase($t))
      #if ($record.isExecuted())
         EXECUTED
      #else
         WAITING
      #end
   #end
#end