Article Overview:
This article will cover how you can achieve the following:
This article will describe how to extract screenshots associated with each step executed in your Virtuoso journey.
Problem Statement:
The test step-wise execution screenshots are needed in the API response. They are visible in the “Screenshot” tab on the Virtuoso platform, but what if the screenshots are needed to be stored or downloaded?
Solution:
Virtuoso provides an API GET /testsuites/execution which can retrieve the screenshots associated with each step of the journey.
The CURL command to run this API is:
curl --location 'https://api.virtuoso.qa/api/testsuites/execution?projectId={{your_project_id}}' \
--header 'Authorization: Bearer {{your_token}}'
Note:
- This API can also be used for a specific execution. In the API URL, replace “projectId=” with “jobId=” and provide your unique “jobId” (or “executionId”).
- You can find your unique “executionId” in the browser URL during an execution.
The response JSON will contain a detailed report of your execution, with step-level granular data. Look for the tags “beforeScreenshot” and “screenshot” to retrieve the screenshots taken before and after each step.
For journeys with multiple checkpoints and steps, the API response JSON can be quite large. Ensure you parse the response correctly to match each screenshot with its corresponding step.
Comments
0 comments
Please sign in to leave a comment.