To create a new report in Testlink, there are a number of steps to follow:
- Create a PHP file inside
lib/results/
which will hold all of the code necessary to generate the report for all of the different formats that you want hte report to be supported for. * The file should probably use the template engine Smarty to generate the reports to display, especially the HTML reports. * Examples of other reports are found in the same folder. - Added the custom report to the configuration file
/cfg/custom_reports.cfg.php
. * The configuration is added in the following format, appeneded to the end of the file, but before?>
:$tlCfg->reports_list['MY_REPORT'] = array( 'title' => 'link_MY_REPORT', 'url' => 'lib/results/MY_REPORT_file.php', 'enabled' => 'all', 'format' => 'format_html' );
*MY_REPORT
should be replaced with an appropriate name for the report. * The'title'
refers to a string that is contained inside ofstrings.txt
inside thelocale/
folder. The title will need to be added to the fields for the languages that are to be supported, such aslocale/en_GB/strings.txt
for English. * The'url'
is the location inside of the Testlink directory where the field that generates your report is found. * Theenabled
refers to when the report will be displayed. It can be eitherall
,bts
(if bug tracker is connected only), orreq
req (if project has available requirements only). * Theformat
is a comma seperated list without spaces, of the different formats that are supported by your reporting file. * For examples of all of this, and the different formats that can be displayed, look insidecfg/report.cfg.php
and insidelib/results/
.
also found this helpful link: http://forum.testlink.org/viewtopic.php?f=11&t=3742