Extension:Testopia Reports

What can this extension do?
Like the extension Bugzilla Reports this extension is aiming for integrating reports from Bugzilla addon Testopia. Furthemore is it able to produce charts using Ploticus or the Google Chart API. The reports are providing links through to Bugzilla and Testopia.

Due to its modular setup it should be easy to add additional reports.

Currently three reports are included with more to come:
 * Test Case Status Report per test run
 * Priority Breakdown Report per test run
 * Bug Status Report per test run
 * Test plan and test cases

Some examples:

It has been extensively tested with MySQL but not with PostgreSQL although it should work with that database too.

Basic Usage
To include a report a parser function is used:

This will include the report only without chart. To render the data in form of a chart an additional parameter must be included:

This will render the same report but with 2D pie chart attached to it.

More complex example
This will render the report
 * testplan
 * with four charts testers,tstatus,category,tprio
 * rendered as pie3,pie,pie3 and bar chart
 * with the widths 500,400,450,400
 * positioned above the data table
 * as 2x2 grid
 * the report be will initially minimized and could be expanded by the user by pressing the button "Show"

Parameters
Complete list of all parameters:

Download instructions
Download the latest version from Google Code.

Installation
To install this extension, add the following to LocalSettings.php: and add the configuration block described below. If you are having an older installation, delete the old directory first.

Configuration parameters
Configuration example (Windows + Ploticus):

Configuration example (Windows + Google Chart API):

Ploticus
This step could be skipped if you decide to render your charts with the Google Chart API.

Testtopia Repors extension has been tested with the latest version 2.41 of Ploticus. You can download it from here: http://ploticus.sourceforge.net/doc/download.html. Follow the installation instructions and after that enter the path to the Ploticus executable in the paramter ploticus and switch chartdevice to the value "ploticus".

Styles
Nearly every aspect of the appearance could be changed by changing the CSS file /skins/tr_main.css. If the result table is displayed with the sorted feature, the MediaWiki build-in class sortable is used.

Creating new reports
... not yet written ...

Chart Colors
If you do not like the pre-defined colors feel free to change them in class TR_Colors.php. Every color used for the charts is defined there.

Version 0.3 - 23.05.2009

 * bug fixes
 * fixed typo in a report name; now it is completion
 * fixed wrong counter in charts for Priority Breakdown Report
 * fixed the last (total) line in each table if the table is sortable
 * enhancements
 * added possibility to set the message (per report) that is being displayed when no results were found by the query (function setMsgNoResultsFound)
 * parameter "sortable" is now per default set to false
 * clean up of routine renderPlainHTML
 * new parameter: chartpos - position relative to the data table (left, top, right, bottom); default: right
 * new parameter: chartlayout - alignment of charts (vertical, horizontal); default: vertical
 * new parameter: nudechart - (true, false); if true the chart will be shown without any table surrounding it; default: false
 * new parameter: showhide - (true, false); if true buttons will be displayed to hide and show the table and chart; needs java script to be enabled
 * new parameter: hidden - (true, false); if using parameter "showhide", "hidden" will control the initial status. If true the table and chart will initial be hidden
 * if a report could render more than one chart at a time, now the chart type (bar, pie, ...) could be specified per chart (simply add more types and delimit them with ",")
 * renamed "charts" to "chart" and "chart" to "charttype" for more clarity
 * added new value(s) to parameter "chartlayout": instead of giving "horizontal" or "vertical" a number could be given. This number will be the number of columns. E.g., 2 = two colums. If three or more charts they will be displayed in more than on row. Each row having two charts.
 * new report "testplan" with details about the test cases for a testplan. Supported charts: tstatus (test case status), testers (assignments to tester), prio (priority of test cases), category (assignments to category)

Version 0.2 - 07.05.2009

 * bug fixes:
 * extension is now behaving correctly if no results are found and is no longer messing the complete screen
 * debug flag is now working even if the result set is not empty
 * enhancements:
 * added new report "completion" which is basically the report included in Testopia
 * introduced report footer for adding additional information at the end of the report
 * added some more strings to the localisation file
 * added some more inline documentation
 * changed routine for adding debug information

Version 0.1 - 29.04.2009

 * initial experimental release with three reports and Ploticus and Google Charts support