Formatted PDF reports

Perfecto Smart Reporting offers the following 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). This report is not available for download from the UI.

  • Full report: Provides a detailed report of a single test within the full test execution. This report is available for download from the UI.
  • Assertions report: Similar to the Full report, with the difference being that it only includes assertion commands. This is a valuable option if you only want to see if assertions were true or false. This report is available for download from the UI.

Limitations

The exported PDF reports cannot include more than 200 screen shots.

Demo video

The following video provides a quick overview of downloading formatted PDF reports.

The Full report and Assertions report are also conveniently available for download from the Single test report (execution report) (see also Download artifacts) .

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.

To obtain a URL to download this PDF:

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

    Copy
    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.

Method API
GET https://<reporting-server>/export/api/v1/test-executions/pdf

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

Full report (STR) or Assertions report

The Full report contains all the details of a single test, as follows:

  • A header that includes the Test Label configured in the test script (for example the text associated with the test step), the status of the test execution (Passed, Failed, Blocked, 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
    • 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.

The Assertion report contains only the assertion commands invoked in the automation script, along with information whether the asserted passed or failed.

Headers

Add the following header parameters to all requests:

Name

Value

Perfecto-Authorization

<Your personal security token>

To obtain the Full report or the Assertions report in PDF format:

Do one of the following:

  • In the Summary PDF report: Click the link to the right of the single test (see above).
  • In the Report Library:
    1. Click the test name.
    2. In the online STR, click the download icon  and select Full report or Assertions report.

Download via API

Find a full code sample here.

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

Method

API

POST

https://<reporting-server>/export/api/v3/test-executions/pdf/task

Parameters
Name Value Description

testExecutionId

<Test ID>

Mandatory parameter. Smart Reporting test ID as returned via the public api as described here.

assertionsOnly

true|false

Optional parameter. Set to true for downloading the Assertions PDF report or to false to omit the parameter for the regular PDF report download.

timeZoneOffsetMinutes


Optional parameter. Set to adjust the times in the report to a different time zone. By default, all times are specified in UTC. For example, to set the times to Jerusalem time, which is GMT +3, set this value to 180.

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

Method

API

POST

https://<reporting-server>/export/api/v3/test-executions/pdf/task/<taskId>

Parameters

Name

Value

Description

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