Netlify
Run one or multiple Endtest test suites after Netlify deployments with the official Endtest extension
Overview
The official Endtest Netlify extension allows you to run Endtest web tests automatically after a successful Netlify deployment.
The extension can:
- Start one Endtest test suite after a deployment goes live.
- Start multiple Endtest test suites in the same API call by using a label.
- Wait for every triggered execution to finish.
- Display the Endtest results in the Netlify deploy log.
- Report failed assertions and execution errors as an extension failure.
- Use a separate Endtest configuration for each Netlify project.
- Pass the current Netlify deployment URL to Endtest.
You can install the extension from the Endtest page in the Netlify Extensions Directory.
The source code is available in the Endtest Netlify Extension repository.
Requirements
Before using the extension, you need:
- An Endtest account.
- Your Endtest
App ID. - Your Endtest
App Code. - An Endtest API Request for starting the desired test execution or executions.
- A Netlify account.
- A Netlify project.
Your App ID and App Code can be found on the Endtest Settings page.
You can generate the API Request by following the instructions from the Endtest API chapter.
Install the Endtest extension
Open the Endtest extension page on Netlify and select Install.
Choose the Netlify team that contains the project where you want to use Endtest.
During installation, the extension requests permission to read, write, and delete project environment variables.
These permissions are used to:
- Save the Endtest configuration for each Netlify project.
- Enable or disable Endtest for a project.
- Read the saved configuration during a deployment.
The extension does not require access to your source-code repository.
Configure Endtest for a Netlify project
After installing the extension:
- Open the desired project in Netlify.
- Select Endtest from the project navigation.
- Enter your Endtest
App ID. - Enter your Endtest
App Code. - Paste the Endtest API Request.
- Choose the maximum number of result checks.
- Select Save and enable Endtest.
The Endtest configuration is stored separately for each Netlify project.
The extension creates and manages the following project-level environment variables:
ENDTEST_ENABLED
ENDTEST_APP_ID
ENDTEST_APP_CODE
ENDTEST_API_REQUEST
ENDTEST_NUMBER_OF_LOOPSThese values are stored in Netlify and are not committed to your website repository.
Endtest API Request
The API Request determines which Endtest test suite or test suites will run.
A typical API Request can include:
- Test suite or label.
- Browser.
- Browser version.
- Operating system.
- Screen resolution.
- Geolocation.
- Test cases.
- Execution notes.
You do not need to include appId or appCode in the saved API Request.
The extension automatically adds the App ID and App Code from the project configuration before starting the execution.
More information about supported API parameters is available in the Endtest API chapter.
Run a single test suite
Use the suite parameter to run one Endtest test suite.
Example:
https://app.endtest.io/api.php?action=runWeb&suite=2945352&platform=windows&os=windows11&browser=chrome&browserVersion=latest&resolution=1280x1024&geolocation=sanfrancisco&cases=all¬es=The Endtest API returns one execution hash:
71frWqyL1YdAVfvlP63DgZ4TGYewnJoOijThe extension uses that hash to check the execution result until the test finishes or the configured polling period expires.
Run multiple test suites with a label
Use the label parameter to run every Endtest test suite associated with the specified label.
Example:
https://app.endtest.io/api.php?action=runWeb&label=Critical&platform=windows&os=windows11&browser=chrome&browserVersion=latest&resolution=1280x1024&geolocation=sanfrancisco&cases=all¬es=In this example, Endtest starts every test suite associated with the Critical label.
The API returns the execution hashes as a comma-separated value:
Udq2dphebLjy29dQr63xe7ZmPGkNZvz3T5,QNHWpc98OE6699qXg63SF2K8KIabRk9bLyThe extension:
- Reads all returned execution hashes.
- Sends all hashes to the Endtest
getResultsAPI endpoint. - Waits until a result is available for every execution.
- Displays the individual result for every test suite.
- Calculates combined failure and error totals.
- Marks the extension as failed when any execution reports failed assertions, execution errors, or a failure status.
The extension uses a results request with the following structure:
https://app.endtest.io/api.php?action=getResults&appId=APP_ID&appCode=APP_CODE&hash=HASH_1,HASH_2&format=json-lightThe json-light response contains one result object for each execution:
[
{
"test_suite_name": "Online Store with AI",
"configuration": "Windows 11 Chrome Latest (v149) 1280 x 1024 San Francisco, US",
"test_cases": 1,
"passed": 0,
"failed": 0,
"errors": 0
},
{
"test_suite_name": "Demo Shop",
"configuration": "Windows 11 Chrome Latest (v149) 1280 x 1024 San Francisco, US",
"test_cases": 1,
"passed": 0,
"failed": 0,
"errors": 0
}
]The same extension configuration supports both single-suite and label-based executions. You only need to change the saved API Request.
Use the current Netlify deployment URL
You can include the following placeholder anywhere inside the Endtest API Request:
{{NETLIFY_DEPLOY_URL}}Before starting the Endtest execution, the extension replaces the placeholder with the URL of the current Netlify deployment.
Example:
https://app.endtest.io/api.php?action=runWeb&suite=123456&startUrl={{NETLIFY_DEPLOY_URL}}The placeholder can also be used in a label-based request:
https://app.endtest.io/api.php?action=runWeb&label=Critical&startUrl={{NETLIFY_DEPLOY_URL}}This can be used to run tests against:
- Production deployments.
- Branch deployments.
- Deploy Previews.
The exact API parameter used for the start URL depends on how your Endtest test is configured.
Choosing the number of result checks
The extension checks the Endtest execution results once every 30 seconds.
For example, when an execution normally takes approximately three minutes, you can use:
Maximum result checks: 7This allows up to 210 seconds:
7 × 30 seconds = 210 secondsChoose a value that is slightly higher than the normal duration of the slowest triggered test suite.
For a group of test suites that usually finishes within five minutes, you can use:
Maximum result checks: 10When multiple test suites are triggered, the extension continues polling until every execution has returned a final result.
If one or more executions do not finish within the configured polling period, the extension reports a timeout.
Deployment behavior
The Endtest extension runs after the Netlify deployment has completed successfully.
For a single execution, the extension reports success when Endtest returns:
Failed: 0
Errors: 0For multiple executions, every result must contain:
Failed: 0
Errors: 0The extension reports a failure when:
- Any execution reports one or more failed assertions.
- Any execution reports one or more execution errors.
- Any execution enters an error or failure state.
- The API returns an invalid response.
- The API does not return a result for every triggered execution.
- One or more executions do not finish within the configured polling period.
A failed Endtest execution is displayed as an extension failure in the Netlify deploy log.
When multiple test suites are triggered, one failed suite causes the complete Endtest extension run to be marked as failed.
Important limitation
Endtest runs after the Netlify deployment has completed. If Endtest reports failed assertions or execution errors, the extension is marked as failed in the deploy log, but the completed deployment remains live and is not removed, canceled, or rolled back.
This behavior allows Endtest to test the actual deployed URL.
The Netlify extension should therefore be used for post-deployment validation rather than as a deployment gate.
Results displayed in Netlify
For a single execution, the extension can display information such as:
- Execution hash.
- Netlify deployment URL.
- Test suite name.
- Test configuration.
- Number of test cases.
- Number of passed assertions.
- Number of failed assertions.
- Number of execution errors.
Example:
Execution hash: abc123
Netlify deployment: https://example.netlify.app
Test suite: Demo Shop
Configuration: Windows 11 Chrome Latest 1280 x 1024
Test cases: 5
Passed: 12
Failed: 0
Errors: 0For multiple executions, the extension displays a combined summary followed by the result of each test suite.
Example:
Executions: 2
Execution hashes: HASH_1, HASH_2
Netlify deployment: https://example.netlify.app
Total failed: 0
Total errors: 0
Execution 1 of 2
Execution hash: HASH_1
Test suite: Online Store with AI
Configuration: Windows 11 Chrome Latest 1280 x 1024
Test cases: 1
Passed: 0
Failed: 0
Errors: 0
Execution 2 of 2
Execution hash: HASH_2
Test suite: Demo Shop
Configuration: Windows 11 Chrome Latest 1280 x 1024
Test cases: 1
Passed: 0
Failed: 0
Errors: 0The Endtest API response may contain the following fields:
test_suite_name{string}: The name of the test suite.configuration{string}: The machine or mobile-device configuration used for the execution.test_cases{int32}: The number of test cases.passed{int32}: The number of assertions that passed.failed{int32}: The number of assertions that failed.errors{int32}: The number of execution errors.start_time{timestamp}: The execution start time.end_time{timestamp}: The execution end time.detailed_logs{string}: The detailed execution logs when thejsonformat is used.screenshots_and_video{string}: Links to screenshots and video recordings when thejsonformat is used.test_case_management{string}: The names, statuses, and external IDs of associated test cases.
The Results page for an execution has the following format:
https://app.endtest.io/results?hash=EXECUTION_HASHEach execution in a label-based run has its own Endtest Results page and execution hash.
Tests without assertions
An Endtest execution can contain test steps without assertions.
In that case, the result can contain:
Passed: 0
Failed: 0
Errors: 0This is still considered a successful execution because Endtest reported no failed assertions and no execution errors.
The same behavior applies to multiple executions. Every execution can report zero passed assertions and still be successful when failed and errors are both zero.
Disable Endtest for a project
To disable the integration:
- Open the Netlify project.
- Select Endtest.
- Select Disable Endtest.
Disabling Endtest stops new executions for that project.
The saved App ID, App Code, and API Request are preserved, so the integration can be enabled again without re-entering the configuration.
Security
The Endtest configuration is stored as project-level Netlify environment variables.
The credentials are not committed to the website repository.
The extension hides the App Code when it displays the API Request in the deploy log.
Because ENDTEST_APP_CODE is stored as a standard Netlify environment variable, users with sufficient access to the Netlify project may be able to view or edit it from the project settings.
Troubleshooting
Endtest does not run after a deployment
Check that:
- The Endtest extension is installed for the correct Netlify team.
- Endtest is enabled for the project.
- The
App IDis correct. - The
App Codeis correct. - The API Request is a complete HTTPS URL.
- The Netlify deployment completed successfully.
The extension only starts Endtest after a successful deployment.
Only one test suite runs
Check the saved API Request.
A request containing:
suite=123456runs one specific test suite.
To run multiple test suites, use a label:
label=CriticalEvery Endtest test suite associated with that label will be triggered.
The configuration cannot be saved
Confirm that the extension has permission to read, write, and delete project environment variables.
If the permissions were changed after the extension was installed, uninstall and reinstall the extension so the installation receives the updated permissions.
The API Request is rejected
Make sure that:
- The request starts with
https://. - The request uses a valid Endtest API action.
- The suite ID or label is valid.
- The browser, operating system, and other configuration parameters are supported.
- The API Request does not need to contain
appIdorappCode, because the extension adds them automatically.
One or more execution results are missing
When a label triggers multiple test suites, Endtest returns multiple execution hashes.
The extension waits until the results response contains one final result for every returned hash.
If some executions take longer than others, increase the Maximum result checks value.
The execution times out
Increase the Maximum result checks value.
Each result check occurs after a 30-second wait.
For example:
10 checks × 30 seconds = 300 secondsFor label-based runs, choose a value that allows enough time for the slowest test suite to finish.
The deployment remains live after a failed test
This is expected.
The Endtest extension runs after deployment so it can test the actual deployed URL.
A failed Endtest execution marks the extension as failed in the deploy log, but it cannot undo a deployment that has already completed.
Manual API integration
The official Endtest extension is the recommended way to integrate Endtest with Netlify.
For custom workflows, you can call the Endtest API directly from a script or Netlify Function.
The custom integration must:
- Send the API Request that starts the test execution or executions.
- Save the execution hash or comma-separated execution hashes returned by Endtest.
- Call the
getResultsAPI endpoint using theApp ID,App Code, and returned hashes. - Continue checking until every execution finishes.
- Report a failure when any execution returns failed assertions or execution errors.
For multiple executions, the results request has the following structure:
https://app.endtest.io/api.php?action=getResults&appId=APP_ID&appCode=APP_CODE&hash=HASH_1,HASH_2&format=json-lightMore information about direct API usage is available in the Endtest API chapter.