Last updated: Aug 09, 2021 16:48
by Nato Vasilevski
If you want to be able to automate the process of downloading a report containing summarized list of your executions for a test run and their results (also called Execution Summary or executions report) in PDF via REST API and if you have been wondering how to do it, this article is for you. For presentation purposes I have used Postman. Below in this article you can find more useful information in related articles.
Please do not forget to hit the “Like” button if you found what you have been searching for. Thank you in advance!
Before you begin:
This article is based on usage of a single Execution ID (External ID). If you want to know to obtain it, please follow this article.
Step-by-step guide
The following HTTP GET command is used to download the executions report:
https://<myCloud>.reporting.perfectomobile.com/export/api/v1/test-executions/pdf
You add the externalId[0] Parameter with a value you can obtain from the testrun itself by using the following line:
String externalId = (String) driver.getCapabilities().getCapability("executionId"); System.out.println("executionId: " + externalId);
Note: you can crosscheck if you have taken the correct ID by opening the report details in the reporting tool:
Headers
Add the following header parameters to the request:
Name
Value
PERFECTO_AUTHORIZATION
<Your personal security token>
Run it and you should receive such result:
- Download the output:
- Find the needed file and note that it doesn’t have an extension:
- Rename the file by typing “.pdf” at the end of the file:
- Open the file and there you will find all the desired result:
You are done!
What do you need to do if you spot something is wrong?
You can open a case here ( https://support.perfecto.io )
Happy testing!
Related articles
https://developers.perfectomobile.com/display/TT/PDF+Download+after+Test+execution
https://developers.perfectomobile.com/display/PD/DigitalZoom+Reporting+Public+API
https://developers.perfectomobile.com/display/PD/API+for+External+Test+Information