How can I get the latest result of all available testcases?

Description
sefas
Posts: 4
Joined: Thu Jan 24, 2013 4:17 pm

How can I get the latest result of all available testcases?

Postby sefas » Thu Feb 21, 2013 9:19 am

We´re using Polarion 2012 (SR 3) as Testmanagement-Tool.
Now I´ve a question regarding tracking test results of all available testcases in a project.

How can I get the latest result of all available testcases?
I´d like an overviews/query of all testcases regarding the latest test result (PASS, FAIL, NOT TESTED)

How can I get the number of the execution of a testcase?

Thanks,
Sebastian

robertneher
Posts: 47
Joined: Sat Jan 22, 2005 10:56 am
Location: Stuttgart
Contact:

Re: How can I get the latest result of all available testcas

Postby robertneher » Fri Feb 22, 2013 8:24 am

to get answered all your questions, a good start mightmbe to have a look on our Tutorials
http://www.polarion.com/resources/index ... ls#testing
or consult our manual, right next to your Polarion portal logon.

Robert
Robert Neher, Polarion Software GmbH

sefas
Posts: 4
Joined: Thu Jan 24, 2013 4:17 pm

Re: How can I get the latest result of all available testcas

Postby sefas » Fri Feb 22, 2013 8:34 am

Sorry but neither the manual nor the tutorials provide an answer to these two questions

robertneher
Posts: 47
Joined: Sat Jan 22, 2005 10:56 am
Location: Stuttgart
Contact:

Re: How can I get the latest result of all available testcas

Postby robertneher » Wed Feb 27, 2013 10:16 am

Well, hoped to find the answer in manual as well
http://community.polarion.org/polarion/ ... 5%6e%22%20

Anyway. After you ran a test run, you will find all test results listed in test case itself.

Please make sure that you switched on the "light form" to see "Test Records" section of test case.
Image

Cheers Robert
Robert Neher, Polarion Software GmbH

nobsi
Posts: 18
Joined: Wed Jan 12, 2011 9:22 am

Re: How can I get the latest result of all available testcas

Postby nobsi » Sat Mar 16, 2013 10:39 am

Hi,

I think we have the same issue but I think actual this is not possible with Polarion.

We want to evaluate the current status of a set of test cases. Within test runs it is only possibly to see the test records for one test run. On the page of the testcase-wi only the current status of this specific test case is viewable. But it woulde be useful like in other test management tools to evaluate the current test results of the test cases over a set of test runs or all test cases.

Up to now to get an overall view of the tests for a specific release we have to export all results of the according test runs and do some magic with excel to get the information. That costs a lot of time.

Best regards
Richard

hanzlikovam
Posts: 11
Joined: Thu Nov 15, 2012 8:49 am

Re: How can I get the latest result of all available testcas

Postby hanzlikovam » Wed Mar 20, 2013 4:54 pm

Hello,

It is not possible to do directly but I assume that could be possible to create a wiki page that will show the latest result of the available test cases.


Best regards,
Martina

Morris
Posts: 3
Joined: Thu Jan 12, 2012 8:41 am

Re: How can I get the latest result of all available testcas

Postby Morris » Tue Mar 26, 2013 2:01 pm

You can use $testManagementService.getLastTestRecords(IWorkItem testCase, int count) to get these kind of information, bu tyou need Polarion 2013 to do that.

Gersbacher
Posts: 7
Joined: Mon Jul 29, 2013 12:19 pm

Re: How can I get the latest result of all available testcas

Postby Gersbacher » Mon Jul 29, 2013 12:39 pm

Is there an short example for usage of $testManagementService.getLastTestRecords? I'm not familiar with Velocity. I tried to code something with reading apache velocity user page, but I still get errors.

sergeD
Posts: 21
Joined: Tue Feb 05, 2013 9:24 am

Re: How can I get the latest result of all available testcas

Postby sergeD » Thu Nov 28, 2013 8:43 am

Hi,

Late answer to and old post but may help, try this:
#set($requirements=$trackerService.queryWorkItems("type:requirement AND project.id:$page.project","id"))
<table border=1 cellpadding=5px>
<th>Requirements</th><th>Test Cases</th>
#foreach($requirement in $requirements)
<tr><td>
{workitem:$requirement.getId()|fields=title|expand=no}
</td>
#set($testcases=$trackerService.getDataService().sqlSearch("SELECT STRUCT_WORKITEM_LINKEDWORKITEMS.FK_URI_P_WORKITEM FROM WORKITEM INNER JOIN STRUCT_WORKITEM_LINKEDWORKITEMS ON WORKITEM.C_PK = STRUCT_WORKITEM_LINKEDWORKITEMS.FK_P_WORKITEM WHERE WORKITEM.FK_PROJECT LIKE '%$page.project' AND STRUCT_WORKITEM_LINKEDWORKITEMS.C_ROLE = 'verifies' AND STRUCT_WORKITEM_LINKEDWORKITEMS.FK_URI_WORKITEM LIKE '%$requirement.getId()'"))

<td>
#foreach($testcase in $testcases)
{workitem:$testcase.getId()|fields=title|expand=no}
#if ($testManagementService.getLastTestRecords($testcase,1).isEmpty())
<td>
Not Executed
</td>
#end
#foreach($lastTestResult in $testManagementService.getLastTestRecords($testcase,1))

<td>
$lastTestResult.getResult().getId()
</td>
#end
#end
</td>
</tr>
#end
</table>

abiresev
Posts: 1
Joined: Tue Jan 21, 2014 5:46 pm

Re: How can I get the latest result of all available testcas

Postby abiresev » Tue Jan 21, 2014 5:48 pm

Thanks a lot, it worked for me!

akostadinov
Posts: 1
Joined: Thu Jun 23, 2016 9:44 am

Re: How can I get the latest result of all available testcases?

Postby akostadinov » Thu Jun 23, 2016 9:48 am

Old thread but answer is suboptimal for me. I see an API call `searchTestRecords` that accepts parameters `query`, `sort` and `limit`. Any advice about query syntax? Also what should I put in `sort`?

KimLem
Posts: 1
Joined: Sun Jan 28, 2018 5:55 pm

Re: How can I get the latest result of all available testcases?

Postby KimLem » Thu Jun 14, 2018 3:11 pm

Has anyone gotten the 'searchTestRecords' to work for this? Is there any way to get the latest results of a test case?

ALMighty
Posts: 80
Joined: Wed Apr 27, 2016 10:34 am
Location: Austria

Re: How can I get the latest result of all available testcases?

Postby ALMighty » Fri Jun 29, 2018 9:15 am

akostadinov wrote:Old thread but answer is suboptimal for me. I see an API call `searchTestRecords` that accepts parameters `query`, `sort` and `limit`. Any advice about query syntax? Also what should I put in `sort`?


akostadinov wrote:Old thread but answer is suboptimal for me. I see an API call `searchTestRecords` that accepts parameters `query`, `sort` and `limit`. Any advice about query syntax? Also what should I put in `sort`?


Sorry folks, but the method searchTestRecords is deprecated and not usable anymore neither with Velocity in Wikipages nor with Java via the API.

Actually tried it out a few minutes ago via the API and I got this error message:

Code: Select all

Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.UnsupportedOperationException: Deprecated since 3.8.1 with no direct replacement. Please contact our technical support.
 faultActor:
 faultNode:
 faultDetail:
   {http://xml.apache.org/axis/}stackTrace:java.lang.UnsupportedOperationException: Deprecated since 3.8.1 with no direct replacement. Please contact our technical support.
   at com.polarion.alm.tracker.internal.TestManagementService.searchTestRecords(TestManagementService.java:302)
   at com.polarion.alm.ws.services.TestManagementWebService.searchTestRecords(TestManagementWebService.java:188)
[...]


I did not try it out in Wikipages but I firmly believe that I will get a similar error message there too.

However,, however, if you wanna know, what the syntax looked like when using this method, here is an example:

Code: Select all

getTestManagementWebService().searchTestRecords("TEST_RECORDS:("Your_Special_Testrun","passed"", "title", 500);
)


... would give you the first 500 passed test cases (only makes sense if the Testrun has more than 500 passed test cases) of the Testrun with ID "Your_Special_Testrun" and sorts the test cases based on their title field.
You can find such queries if you click on the buttons Passed, Blocked, Failed and Waiting which you can find if you open a Testrun in the Web UI of your Polarion (like you can see them in this thread of mine) and also in the c_query field of the Testrun table in the PostgreSQL database of your Polarion.

Are there alternatives?

Yes of course, in Wikpages you can invoke getLastTestRecords with Velocity and via the API you can use the method getTestCaseRecords.

The way for finding out execution results of test cases which I like the most however is Polarion's Postgre SQL database, the table struct_testrun_records shows every result of every testcase in every testrun.
---------------------------------------------------------------------------------------------------
Playing a good game is never lame. :D
Image


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 13 guests