Reports and output objects
T-Plan Robot Enterprise scripts are able to produce the following output objects:
Each script is in addition able to produce an HTML or XML report (XML is supported
by Enterprise version only) which summarizes the output objects,
usually in the order in which they were created. Reports are generated
by so called report provider.
It is an object which typically attaches to the output object
generators and refreshes the report file as new objects are created.
This approach allows to view the report while the script is being
executed and track the automation progress.
- Screen shots with
optional image comparison results (through the Screenshot
- Warnings (through
command) which may be optionally associated with a screen shot,
- Script mappings and
(generated by the Script
commands as discussed in the previous topic; Enterprise
- Exit code (defined
by the Exit
command) where the value of 0 indicates "pass" and any other value is
interpreted as "fail".
Report providers are started by the Report command
which requires a mandatory target
report file argument and optional provider code and report description. If the target
file is relative, it gets saved to the output path (which has been
described in the Predefined variables topic).
code is not specified, it defaults to the value from the Report
command preferences. Format of the report is guessed from the file
extension (.html, .htm, .xml). T-Plan Robot Enterprise contains two
An important feature of both the providers is that they always process all output objects created by the
script (or by any library it calls). It has two important
impacts: First, even if you call the Report command at the end of
the script, the resulting report file will contain all objects created
before the call. Second, there's unfortunately no filtering mechanism
allowing to select just some output objects for the report (though the
XSL file could be customized to process just a subset of the XML data).
- Enterprise provider
(code "enterprise", Enterprise
both XML and HTML formats. The XML document contains definitions of all
output objects, environment parameters and variables. It may be used
both as a report viewable in a web browser (through a linked XML Style
Sheet, XSL) or as a source of test data (test results) for export to
third party test management applications, for example T-Plan Professional 7.0.
file may be modified to provide a
custom view and plugged back into the provider through its preferences
HTML format is requested, the provider initially generates the
XML and then applies the XSL transformation to produce the HTML code.
As this operation is costly with a large number of output objects, it
is recommended either to stick to the XML format or switch to the
- Default provider
(code "default") is a legacy
HTML-only provider shared with the now legacy VNCRobot Version 1.3 or 2.0 projects. Though
it provides a similar view of the data, it does not allow to customize
the produced HTML code and it also can not handle script mappings and
As report providers are implemented as plug ins, you are free to write
your own one in Java and plug it to the tool. See the Plugin Framework document
for instructions; the corresponding functional interface is ReportProvider.
The following example is a dummy and doesn't automate anything. It just
generates one of each supported output objects and we will use it for
report demonstration purposes:
Here are reports created by all available provider and format
Report "enterprise.xml" provider="enterprise" desc="Dummy"
Report "enterprise.html" provider="enterprise" desc="Dummy"
Report "default.html" provider="default" desc="Dummy"
To reproduce it on your own follow these
- Start T-Plan Robot Enterprise and connect it to a desktop.
- Copy the script code to the editor.
- Add one of the Report commands (position doesn't
- Select Tools->Take A
Screenshot in the menu and save the
picture to a file called dummy.png in your home folder. It will serve
as image comparison template for the Screenshot command.
- Execute the script.
- Right click the Report command in the editor and select "View report in web browser"
in the context menu.