Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Sep 17, 2019 14:43

Perfecto Smart Reporting offers the following levels of reports in PDF format:

  • Summary PDF report: Provides the full execution summary in PDF format, including a link to the Report Library to access the Single Test Reports that comprise the full execution (or multiple executions).
  • Single Test PDF report: Provides a detailed report of a single test within the full test execution.

Summary PDF report

The Summary PDF report contains:

  • A header that presents a summary of the results of all tests in an execution. The header is repeated on each page of the report.
  • Execution metadata for the full execution: start time, end time, duration, and owner.
  • A link to the online Summary report.
  • A list of all single test units within the execution and a link to view the online STR for the specific test.

Summary Report PDF

To obtain a URL to download this PDF:

  • Use the reportPdfUrl capability inside your test script. For example:

    String reportPdfUrl = (String)(driver.getCapabilities().getCapability("reportPdfUrl"));

You can use this URL in an API call to download the actual PDF file. For more information, see Smart Reporting Public API.

Download via API

Find a full code sample here.

Use the following HTTP GET command to retrieve the summary pdf report.

MethodAPI
GEThttps://<reporting-server>/export/api/v1/test-executions/pdf

Parameters

The following URL query parameters can be added to the URL to filter the number of returned executions.

Note:When transmitting URL parameters that include special characters, such as the bracket characters ('[', ']'), the URL should be URL-encoded. We suggest using tools that encode URL parameters, like those included in the Apache HTTP Client component.

NameValueDescription
externalId[0]<Driver execution id>Filters the data to show reports that match a specific driver execution
tags[0]<Reporting tag>Filters the data to show reports that match a specific tag
jobName[0]<CI Job Name>Filters the data to show reports that match a specific job name
jobNumber[0]<CI Job Number>Filters the data to show reports that match a specific job number

A request can combine any number of filter parameters (externalId, jobName, jobNumber) to achieve the filtered list.

Headers

Add the following header parameters to the request:

NameValue
PERFECTO-AUTHORIZATION

<Your personal security token>

Note: The Summary PDF report can contain a summary of up to 1000 reports.

Single Test PDF Report

The Single Test PDF report contains all the details of a single test, as follows:

  • A header that includes the Test Label, for example the text associated with the test step, configured in the test script, the status of the test execution (Passed, Failed, or Unknown), and the start time of the execution.
  • The first page that details the following test metadata:
    • Execution details, including start time, end time, duration, owner
    • Device details, such as device type, id, OS, location
    • Wind Tunnel persona information
    • Test tags
    • Job and project information
  • Information on the execution of each script step and the commands in each step. This may spread over many pages.

To obtain the PDF:

  1. Click the link to the right of the single test in the Summary PDF report (see above) or the test name in the Reporting Library.
  2. When displaying the online STR, select the Download PDF report menu item.


PDF Download


Download via API

Find a full code sample here.

Important Note: Version 1 of the API is deprecated and subject to deletion.


To download the single test report via API, you need to obtain a test ID via the public API, as described here.

The following set of HTTP commands is used to retrieve the Single Test PDF report:

Step 1 | Submit a request to generate the PDF report

MethodAPI
POSThttps://<reporting-server>/export/api/v2/test-executions/pdf/task

Parameters

NameValueDescription
testExecutionId<Test ID>Mandatory parameter. DigitalZoom test ID as returned via the public api as described here
assertionsOnlytrue|falseOptional parameter. true for downloading the assertions pdf report, false or omit the parameter for the regular pdf report downlod

The format of the response is a JSON structure with the following fields:

  • taskId
  • status: Either IN_PROGRESS or COMPLETE
  • url: The final URL to download the PDF when it is ready

Step 2 | Poll the task status by taskId until the PDF is ready and the API call returns the status COMPLETE

MethodAPI
POSThttps://<reporting-server>/export/api/v2/test-executions/pdf/task/<taskId>

Parameters

NameValueDescription
taskId
<Task ID>ID of the task that was returned by the initial api call

The format of the response is a JSON structure with the following fields:

  • taskId
  • status: Either IN_PROGRESS or COMPLETE
  • url: The final URL to download the PDF when it is ready

Step 3: Download the PDF file from the URL specified in the URL field of the response

Headers

Add the following header parameters to all requests:

NameValue
PERFECTO-AUTHORIZATION

<Your personal security token>

The following video provides a quick overview of using PDF formatted reports: