How to customize the test report with active builds only?

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

How to customize the test report with active builds only?

Postby tbn83 » Wed Dec 06, 2017 1:33 pm

Hello everybody,

I use Testlink 1.9.16 to validate several softwares. I created some builds for each versions. For example :
- for version V1.0 :
1st build --> V1.0.1
2nd build --> V1.0.2
3rd build --> V1.0.3

- for version V2.0 :
1st build --> V2.0.1
2nd build --> V2.0.2
3rd build --> V2.0.3
4th buil --> V2.0.4

I finished to validate the first version, so in "Build management" I deactivated all builds of this first version.
After that, I validate the 2nd version and I want to generate the Test report (HTML or Word format) for only the active builds! Actually, even if the builds of version V1.0 are inactive, when I generate the Test report, we have the results for all builds (Version V1.0 AND V2.0)!!
However, in "Build management" we have this information : "Active / inactive - defines whether the build can used. Incative builds are not listed on the execution and reports pages" --> I don't understand that the results for incative builds are in the test report.

So my question is : How to custom the test report with only active builds?

Thank you for your help
tbn83
TestLink user
 
Posts: 3
Joined: Sun Dec 03, 2017 9:41 am

Re: How to customize the test report with active builds only

Postby tbn83 » Thu Jan 11, 2018 11:01 am

With the latest code from github (1.9.17), I searched and found the file which has been modified to have only the results of active builds in your test report.
This file is : print.inc.php

If you want, we can insert one line of code, in red below :

$linkedItem = $tplan_mgr->getLinkInfo($tplan_id,$id,$platform_id);

$sql = " SELECT E.id AS execution_id, E.status, E.execution_ts, E.tester_id," .
" E.notes, E.build_id, E.tcversion_id,E.tcversion_number,E.testplan_id," .
" E.execution_type, E.execution_duration, " .
" B.name AS build_name " .
" FROM {$tables['executions']} E " .
" JOIN {$tables['builds']} B ON B.id = E.build_id " .
" WHERE 1 = 1 ";

//Bugfix to show only active builds in Test Report view
$sql .= "AND B.active = 1";


if(isset($context['exec_id']))
{
$sql .= " AND E.id=" . intval($context['exec_id']);
}
else
tbn83
TestLink user
 
Posts: 3
Joined: Sun Dec 03, 2017 9:41 am


Return to TestLink 1.9



Who is online

Users browsing this forum: No registered users and 4 guests