Skip to content

Commit ea2d44b

Browse files
author
Anders Jaensson
authored
Merge pull request #9 from SmartBear/add-support-for-pdf-report
Download reports in pdf format
2 parents b921429 + 29c7cc2 commit ea2d44b

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ table includes the currently implemented options.
7373
| tags | "smoketest,regression" | See description above|
7474
| output | c:\\temp\\reports | Directory to store reports in.|
7575
| reportFileName | File name for the report. If omitted, the report will get a name based on the test job ID|
76-
| format | excel | Specify the file type of the report. Currently supported formats are json, junit and excel. The default format is junit|
76+
| format | excel | Specify the file type of the report. Currently supported formats are json, junit, excel and pdf. The default format is junit|
7777
| proxyHost | 172.0.1.10 | Hostname or IP of the server to use as a proxy for outgoing requests (from TestEngine)|
7878
| proxyPort | 8888 | Port of the proxyHost to contact for outgoing requests (from TestEngine)|
7979
| proxyUser | John | Optional username to authenticate with the proxy|
@@ -118,13 +118,13 @@ Each job has a job ID, with the command "jobs cancel" a running (or queued) job
118118
Each job has a job ID, with the command "jobs report" you can request the execution report for a completed job.
119119
The "output" argument is mandatory, "format" is optional.
120120

121-
`testengine jobs report output=/tmp/reports foramat=excel <job ID>`
121+
`testengine jobs report output=/tmp/reports format=excel <job ID>`
122122

123123
| Option | Sample Value | Description|
124124
|---|---|---|
125125
| output | c:\\temp\\reports | Directory to store reports in.|
126126
| reportFileName | File name for the report. If omitted, the report will get a name based on the test job ID|
127-
| format | excel | Specify the file type of the report. Currently supported formats are json, junit and excel. The default format is junit|
127+
| format | excel | Specify the file type of the report. Currently supported formats are json, junit, excel and pdf. The default format is junit|
128128

129129
### Clean up old jobs from the server database
130130
To remove old jobs from the server (to preserve disk space or limit the risk of data leakage), you can use the prune command:

bin/jobs_functions.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function printModuleHelp() {
6969
util.error("Usage: testengine jobs <command>");
7070
util.error("Commands: ");
7171
util.error(" list [format=text/csv/json] [user=username|list of usernames] [status=status|(list of statuses)]");
72-
util.error(" report output=<directory> [reportFileName=<filename>] [format=junit/excel/json] <testjobId>");
72+
util.error(" report output=<directory> [reportFileName=<filename>] [format=junit/excel/json/pdf] <testjobId>");
7373
util.error(" status <testjobId>");
7474
util.error(" cancel <testjobId>");
7575
util.error(" prune [before=YYYY-MM-DD]");
@@ -131,6 +131,11 @@ function reportForTestJob(testjobId, outputFolder, fileName, format) {
131131
reportFilename = fileName ? fileName : ('report-' + testjobId);
132132
reportFilename += '.json';
133133
break;
134+
case 'pdf':
135+
contentType = 'application/pdf';
136+
reportFilename = fileName ? fileName : ('report-' + testjobId);
137+
reportFilename += '.pdf';
138+
break;
134139
default:
135140
util.error("Invalid format: " + format);
136141
contentType = '';

bin/run_functions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module.exports.dispatcher = function (args) {
5555
function printModuleHelp() {
5656
util.error("Usage: testengine run <command>");
5757
util.error("Commands: ");
58-
util.error(" project [testsuite=<name>] [async] [skipdeps] [testcase=<name>] [timeout=<seconds>] [tags=(tag1,tag2)] [output=<directory>] [reportFileName=<filename>] [format=junit/excel/json] [environment=<environment name>]");
58+
util.error(" project [testsuite=<name>] [async] [skipdeps] [testcase=<name>] [timeout=<seconds>] [tags=(tag1,tag2)] [output=<directory>] [reportFileName=<filename>] [format=junit/excel/json/pdf] [environment=<environment name>]");
5959
util.error(" [projectPassword=<password>] [proxyHost=<hostname>] [proxyPort=<port>] [proxyUser=<username>]");
6060
util.error(" [proxyPassword=<password>] <filename>");
6161
util.error(" help");

0 commit comments

Comments
 (0)