Instructions
You can use the Endtest API and a Shell Script task to integrate Endtest with Azure DevOps.YAML Snippet
test.sh
at the root of your repo.
We recommend creating this file from a Linux environment (such as a real Linux machine or Windows Subsystem for Linux) so that line endings are correct.
Also, don’t forget to chmod +x test.sh
before you commit it.
test.sh
- The
App ID
for your account. - The
App Code
for your account. - The API Request for starting the test execution.
- The number of times the API request for fetching the results will be sent once every 30 seconds.
7 x 30 seconds = 210 seconds > 3 minutes
Don’t forget to make your Shell script executable by running the following command:
jq
package:
test.sh
script locally would have the following format:
test.sh
script locally would look like this:
Since you will be integrating Endtest into your current Azure DevOps Pipeline, your actual YAML file will also contain existing instructions that are not related to Endtest. And it will also contain instructions to read the JSON output from the Endtest API response in order to execute a certain logic in the pipeline (such as marking a build as Passed or Failed).The JSON with the results contains the following keys:
test_suite_name
- The name of the test suite.configuration
- The configuration of the machine or mobile device on which the test was executed.test_cases
- The number of test cases.passed
- The number of assertions that have passed.failed
- The number of assertions that have failed.errors
- The number of errors that have been encountered.start_time
- The timestamp for the start of the test execution.end_time
- The timestamp for the end of the test execution.detailed_logs
- The detailed logs for the test execution.screenshots_and_video
- The URLs for the screenshots and the video recording of the test execution.test_case_management
- The name, status and external IDs for each test case.
hash
variable to generate the link to the Results page for that test execution:
More details about our API are available in the Endtest API chapter.