Skip to content

Instantly share code, notes, and snippets.

@ConorPKeegan
Created August 9, 2016 14:26
Show Gist options
  • Save ConorPKeegan/e93364e69b41a3f837ab6e2daa11df22 to your computer and use it in GitHub Desktop.
Save ConorPKeegan/e93364e69b41a3f837ab6e2daa11df22 to your computer and use it in GitHub Desktop.
How to create a new report in Testlink

Creating a new report in Testlink

To create a new report in Testlink, there are a number of steps to follow:

  1. 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.
  2. 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 of strings.txt inside the locale/ folder. The title will need to be added to the fields for the languages that are to be supported, such as locale/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. * The enabled refers to when the report will be displayed. It can be either all, bts (if bug tracker is connected only), or req req (if project has available requirements only). * The format 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 inside cfg/report.cfg.php and inside lib/results/.
@Aminot1
Copy link

Aminot1 commented Jul 23, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment