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.
The Summary PDF report can contain a summary of up to 1000 tests.
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:CopyString 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 on GitHub.
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 following table lists some of the
status[0]=FAILED&status[1]=BLOCKED&tags[0]=tag1&tags[1]=tag2
Name | Value | Description |
---|---|---|
startExecutionTime |
|
The start time, in milliseconds from midnight January 1, 1970 GMT - Epoch/Unix Time. If this parameter is set, Perfecto makes sure that the test start time is greater or equal to the startExecutionTime |
endExecutionTime |
|
The end time, in milliseconds from midnight January 1, 1970 - GMT Epoch/Unix Time. If this parameter is set, Perfecto makes sure that the test start time is less or equal to the endExecutionTime |
externalId |
|
Filters the data to show reports that match a specific driver execution. |
tags |
|
Filters the data to show reports that match a specific tag. You can query for several tags by adding the following: Copy
Perfecto uses OR logic to search the tags. This means that if one of the tags matches, the test will appear in results. To exclude a tag (or any other field), add it inside the To exclude a tag so that tests containing it will not be included in the results, use the following: Copy
The x prefix also works to exclude other fields from the report. |
status |
|
Filters the data to show reports that match a specific test status |
Id |
|
Filters the data to show reports that match a specific test ID |
executionId[0] or externalId |
|
Filters the data to show reports that match a specific execution ID |
os |
|
Filters the data to show reports that match a specific operating system |
browserType |
|
Filters the data to show reports that match a specific browser type |
browserVersion |
|
Filters the data to show reports that match a specific browser version. For example: Copy
|
screenResolution |
|
Filters the data to show reports that match a specific screen resolution. For example: Copy
|
deviceType |
|
Filters the data to show reports that match a specific device type |
deviceModel |
|
Filters the data to show reports that match a specific mobile device model. For example: Copy
|
deviceId |
|
Filters the data to show reports that match a specific device ID |
jobName |
|
Filters the data to show reports that match a specific job name |
jobNumber |
|
Filters the data to show reports that match a specific job number |
jobBranch |
|
Filters the data to show reports that match a specific job branch |
projectVersion |
|
Filters the data to show reports that match a specific project version |
projectName |
|
Filters the data to show reports that match a specific project name |
failureReason |
|
Filters the data to show reports that match a specific failure reason ID |
customField.FIELD_NAME |
|
Filters the data to show reports that match the value of a specific custom field. For example: Copy
|
cleanException |
|
Filters the data to show only reports that match the value of a specific clean exception, which is a cleaned-up version of the exception that occurred. To extract the code of the exception, Perfecto looks for specific strings in the stack trace. In the UI, this field is labeled Exception Summary. |
triggerType |
|
Filters the data to show reports that match a specific trigger type |
A request can combine any number of filter parameters (externalId, jobName, jobNumber) to achieve the filtered list.
Add the following header parameters to the request.
Name |
Value |
---|---|
Perfecto-Authorization |
<Your personal security token> |
The Summary PDF report can contain a summary of up to 1000 tests.
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:
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 |
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 |
The format of the response is a JSON structure with the following fields:
taskId
status
: EitherIN_PROGRESS
orCOMPLETE
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
: EitherIN_PROGRESS
orCOMPLETE
url
: The final URL to download the PDF when it is ready