Download PDF - Perl::Formance

Transcript
42
Tapper User Manual
8.2.2.1 download Synopsis
#! upload REPORTID FILENAME
There is no other payload neccessary here, just this single line.
8.2.2.2 download Parameters
• REPORTID
The id of the report to which the file is assigned
• FILENAME
The name of the file as it was specified on upload
8.2.2.3 download Example usage
Just echo the first api-command line and redirect the answer into a file.
$ ( echo "#! download 552 xyz.tmp" ) | netcat -w1 bascha 7358 > xyz.tmp
8.2.3 mason - Render templates with embedded query language
To query report results we provide sending templates to the API in which you can use a query
language to get report details: This api-command is called like the template engine so that we
can provide other template engines as well.
8.2.3.1 mason Synopsis
#! mason debug=0 <<ENDMARKER
payload
ENDMARKER
8.2.3.2 mason Parameters
• debug=1
If ‘debug’ is specified and value set to 1 then any error message that might occur is reported
as result content. If debug is omitted or false and an error occurs then the result is just
empty.
• <<ENDMARKER
You can choose any word instead of ENDMARKER which should mark the end of input,
like in HERE documents, usually some word that is not contained in the template payload.
8.2.3.3 mason Payload
A mason template.
Mason is a template language, see http://masonhq.com. Inside the template we provide a
function reportdata to access report data via a query language. See section [Query language],
page 43 for details about this.
8.2.3.4 Example usage
This is a raw Mason template:
% my $world = "Mason World";
Hello <% $world %>!
% my @res = reportdata ’{ "suite.name" => "perfmon" } :: //tap/tests_planned’;
Planned perfmon tests:
% foreach (@res) {
<% $_ %>
% }