This GitHub Action triggers one or more Endtest test executions, waits for all of them to finish, and exposes their results as workflow outputs.
It supports both API response shapes:
- A single execution hash, usually returned when the request uses
suite. - Multiple comma-separated execution hashes, usually returned when the request uses
labeland matches multiple test suites.
on: [push]
name: Endtest
jobs:
test:
name: Endtest functional tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests with the Critical label
id: endtest
uses: endtest-technologies/github-run-tests-action@v1.10
with:
app_id: ${{ secrets.ENDTEST_APP_ID }}
app_code: ${{ secrets.ENDTEST_APP_CODE }}
api_request: >-
https://app.endtest.io/api.php?action=runWeb&appId=${{ secrets.ENDTEST_APP_ID }}&appCode=${{ secrets.ENDTEST_APP_CODE }}&label=Critical&platform=windows&os=windows11&browser=chrome&browserVersion=latest&resolution=1280x1024&geolocation=sanfrancisco&cases=all¬es=
number_of_loops: 60
results_format: json-light
fail_build: true
- name: Show the execution summary
if: always()
env:
EXECUTION_COUNT: ${{ steps.endtest.outputs.execution_count }}
TEST_CASES: ${{ steps.endtest.outputs.test_cases }}
PASSED: ${{ steps.endtest.outputs.passed }}
FAILED: ${{ steps.endtest.outputs.failed }}
ERRORS: ${{ steps.endtest.outputs.errors }}
FAILED_TEST_CASES: ${{ steps.endtest.outputs.failed_test_cases }}
TEST_EXECUTIONS: ${{ steps.endtest.outputs.test_executions }}
run: |
echo "Executions: $EXECUTION_COUNT"
echo "Test cases: $TEST_CASES"
echo "Passed assertions: $PASSED"
echo "Failed assertions: $FAILED"
echo "Errors: $ERRORS"
echo "Failed test cases: $FAILED_TEST_CASES"
echo "$TEST_EXECUTIONS" | jqapp_id{string}, required: The App ID for your Endtest account, available on the Endtest Settings page.app_code{string}, required: The App Code for your Endtest account, available on the Endtest Settings page.api_request{string}, required: The complete Endtest API request that starts the test execution or executions.number_of_loops{integer}, required: The maximum number of result checks. The action waits 30 seconds before each check.results_format{string}, optional:jsonfor detailed logs and media URLs, orjson-lightfor a smaller summary response. The default isjson.fail_build{boolean}, optional: Set totrueto fail the GitHub Actions step when any execution reports failed assertions or errors. The default isfalsefor backward compatibility.
For CI workflows, setting fail_build: true is recommended. The action writes all outputs before failing the step, so later steps using if: always() can still publish or inspect the Endtest results.
The step fails when the aggregated failed value is greater than zero, the aggregated errors value is greater than zero, a test case status is Failed, Error, or Erred, or the Endtest API itself returns Erred..
Leave fail_build set to false for informational or non-blocking test executions.
When Endtest returns multiple hashes, the action sends all hashes in one getResults request and waits until the API returns a result for every hash.
The existing outputs remain convenient for single executions and behave as follows for multiple executions:
test_suite_nameandconfigurationbecome JSON arrays.test_cases,passed,failed, anderrorsare totals across all executions.start_timeis the earliest start time andend_timeis the latest end time.detailed_logsandscreenshots_and_videoare flattened JSON arrays.resultsbecomes a JSON array of individual Endtest Results page URLs.
Use test_executions when you need the complete per-execution data without aggregation.
test_suite_name{string}: One test suite name, or a JSON array of names.configuration{string}: One configuration, or a JSON array of configurations.test_cases{integer}: Total test cases across all executions.passed{integer}: Total passed assertions across all executions.failed{integer}: Total failed assertions across all executions.errors{integer}: Total errors across all executions.failed_test_cases{integer}: Total test cases with aFailed,Error, orErredstatus.start_time{timestamp}: Earliest execution start time.end_time{timestamp}: Latest execution end time.detailed_logs{JSON string}: Flattened detailed logs. This is an empty array withjson-light.screenshots_and_video{JSON string}: Flattened screenshot, log, and video URLs. This is an empty array withjson-light.hash{string}: The original hash response, including comma-separated hashes.results{string}: One Results page URL, or a JSON array of URLs.execution_count{integer}: Number of completed executions.hashes{JSON string}: Array of execution hashes.result_urls{JSON string}: Array of Results page URLs.test_executions{JSON string}: Complete API response normalized to an array.
The action fails with a clear message when:
- The trigger request does not return a valid hash or comma-separated hash list.
- Endtest returns
Erred.. - The results response is not valid JSON.
- Not all execution results are available before
number_of_loopsis exhausted. fail_buildistrueand Endtest reports failed assertions, errors, or failed test case statuses.