Smart Reporting Public API

Use the Smart Reporting API to retrieve your entire test execution content in JSON format. You can retrieve the following types of test execution data:

  • Execution Report: Lists all executions performed. This report includes links to the artifacts (can be downloaded via the links to them): video, device logs, PCAP files.

  • Single Test Commands Report: Test commands of a particular test execution. The test commands are presented according to their execution order and includes the metadata (time and length of execution) for the test execution. This report includes links to all artifacts (can be downloaded via the links to them): video, screenshots, device logs, PCAP files, and PDF reports (Summary PDF, Single Test Report PDF).

Smart Reporting API terminology

Using the Smart Reporting API requires that you be acquainted with the following information:

  • Cloud name: The "private" name of your Perfecto cloud. For example: If you use the cloud at https://demo.perfectomobile.com, then: cloud name=demo

  • Reporting server: Perfecto Smart Reporting information is stored in a repository on the reporting server. The URI of the reporting server is the same as your Perfecto cloud with .app appended to the cloud name.

    For example, if you access your Perfecto cloud using the URL https://demo.perfectomobile.com, the corresponding reporting server would be accessed at https://demo.app.perfectomobile.com.

  • Execution ID: Each execution has a unique identifier. To obtain the ID for a particular execution, use the following code sequence in your automation script:

    Copy
    Capabilities capabilities = driver.getCapabilities();
    String executionId = (String) capabilities.getCapability("executionId");

Demo video

Watch the following video to learn how you can use the Public Reporting API to retrieve test execution reports in JSON format.

Code samples

To see the full Java code sample, see the export-api-sample in the Perfecto Git repository. Similar samples in other languages can be found in the Reporting-Samples folder (look for the export-api-sample in each language folder) in the Git repository.

Obtain a personal security token

The API requires the use of the Perfecto security token. All artifact links are secure links that require the use of the Perfecto security token. Before proceeding, follow the procedure detailed in the Security Token documentation.

The security token is associated with the specific Perfecto cloud and the personal registered user.

Use the relevant API to export data

The API provides the following options for retrieving report information:

Important: The API calls are only valid after closing the Automation Driver, by executing the driver.close() method.