Example: Identifying Process Execution Failures with Certify Results API
This example shows you how to identify applications, windows, and objects that have process execution failures so that you can take corrective action.
Prerequisites
- Generate a token in Certify Results API. For more information, see Generating a Token in Certify Results API.
-
If you will be using Microsoft® Power BI® Desktop, download the following:
https://www.microsoft.com/en-us/download/details.aspx?id=58494
API Endpoints
Microsoft Power BI Desktop Example
-
Open the Certify Results API Swagger page:
http(s)://yourdomain/CertifyResultsAPI/swagger/ui/index
-
Generate a token. For more information, see Generating a Token in Certify Results API.
-
Add the API token to Swagger.
-
Enter the required inputs to the GET /api/v1/projects/{projectName}/StepResults/ResultFolders/{resultFolder} endpoint as described in the above API Endpoints section.
-
Click the Try it out! button.
-
Copy the URL that was generated in the Request URL section.
Example:
http://certifydemo/CertifyResultsAPI/api/v1/projects/Functional%20Tests/StepResults/ResultFolders/%2FFunctional%20Tests%2FExecution%20Manager?status=failed&status=aborted&startDate=05%2F01%2F2019&endDate=07%2F31%2F2019&includeObjects=true
-
Open Microsoft Power BI Desktop.
-
From the Get Data menu, select Web.
The From Web dialog opens.
-
Select the Advanced option.
-
In the URL parts field, paste the URL generated in the Request URL section.
-
From the HTTP request header parameters (optional) field, enter token.
-
In the second field, paste the resultsAPIToken value.
-
Click OK.
-
From the Query window, edit the query name to Failed Steps.
-
In the Results column, click List.
-
Click the To Table button to expand the data.
The To Table dialog opens.
-
Click OK.
-
In the Queries window, click the Expand button on the right corner of the first column.
- Select the following columns:
- WindowName
- ProcessFullName
- LogTestStepID
- ApplicationVersionName
- ObjectName
- Narrative
- Action Name
- StartDate
- Status
- ErrorMessage
-
To convert the StartTime column to the Microsoft Power BI Date Time format, right-click on Column1:StartTime and select from the drop-down menu Split Column > By Delimiter.
The Split Column by Delimiter dialog opens.
-
In the Select or enter delimiter field, enter T.
-
Click OK.
-
Click the Close & Apply button.
The Failed Steps query and its columns appear in the Fields section.
-
To add TreeMap visualization, click the TreeMap button under the Visualizations section.
A blank TreeMap control opens.
-
Drag the Failed Steps Columns into the Group, Details, and Values fields.
The TreeMap automatically populates.
-
To add Table visualization, click the Table button under the Visualizations section.
A blank Table control is added.
-
Drag fields in the Values section.
The Table automatically populates.
-
To add two Card visualizations, click the Card button under the Visualizations section.
Two blank Card controls are added.
-
Drag the Column1.ProcessFullName field into the Fields section for the first card.
-
Change the aggregation for the column to be Count (Distinct).
-
Drag the Column1.ObjectName field into the Fields section for the second card.
-
Change the aggregation for the column to be Count (Distinct).
-
Save the file and publish.