Keeping Review Apps Honest with Endtest: Smoke Checks, API Triggers, and Safe Cleanup
By Antoine Dubois · August 18, 2026
A practical workflow for running Endtest smoke checks against ephemeral review apps, handling environment variables, stopping failed runs, and cleaning up when preview environments disappear.
Ephemeral review apps are great at exposing integration breakage early, but they also create a small operational problem: the app URL is temporary, the environment can vanish before a long test suite finishes, and a failing branch should not leave behind orphaned browser runs or stale test data. That is the point where a browser smoke layer needs to be deliberately lightweight.
For this workflow, Endtest is a good fit when you want browser checks that can be triggered from CI, pointed at a branch-specific URL, and cleaned up when the environment is torn down. Endtest’s API can trigger runs, fetch results, and manage suites, while its API testing capability lets you mix API setup or assertions with browser steps in the same test. That combination matters for review apps, because you usually only need to confirm that the deployed app boots, the critical page renders, and one or two journeys still work.
The goal is not full regression. The goal is to prove that this specific deployment is worth keeping alive.
The workflow in one sentence
On deploy, create or expose a review app URL, pass that URL into Endtest as an environment-specific value, trigger a short smoke suite through the API, poll for completion, and if the branch or environment disappears, stop any in-flight run and clean up the branch context in your CI system.
That sounds simple, but there are a few important choices hiding inside it:
- Which assertions belong in smoke checks, and which belong in the nightly suite
- Where the review app URL should live, so it can be injected without editing test definitions
- How to stop or cancel a run when the ephemeral environment is destroyed
- How to avoid false failures when the app is still warming up
- How to keep the workflow maintainable enough that preview branches do not become a maintenance burden
What to validate in a review app smoke suite
A smoke suite against an ephemeral environment should be intentionally narrow. If you let it expand into “just one more check,” it becomes a mini regression suite and loses its value.
Good smoke assertions
Use smoke tests for checks that answer, “Did the deployment land in a usable state?”
- The root page returns a 200 and renders the expected shell
- The app loads the correct environment banner, tenant, or branch label if one exists
- Login or session bootstrap works for a known test account
- One critical route opens, such as dashboard, account settings, or checkout landing page
- A single API-backed data path works, for example create a fixture record, then verify it appears in the UI
- Basic client-side errors are absent on the first critical screen, if your app exposes them visibly
What to leave out
Avoid long flows and edge-case coverage in the ephemeral path:
- Multi-step purchase or onboarding flows
- Cross-browser matrices larger than the deployment gate needs
- Visual regression collections unless the review app is meant for design sign-off
- Data-heavy scenarios that depend on a stable seeded dataset
- Flaky assertions that need long waits or broad retries
A useful rule is this: if a check can be skipped without risking the decision to keep or reject the deployment, it probably does not belong in the smoke gate.
Why Endtest fits this pattern
Endtest is positioned as an agentic AI test automation platform with low-code and no-code workflows, but the relevant part here is the operational shape of the product: browser tests can be expressed as editable platform-native steps, and the API can be used to trigger and manage runs. That is a good match for review apps because you want a test definition that is easy to review, not a pile of generated framework code that only one person understands.
Endtest also supports mixed API and UI flows in the same test. According to the product docs, you can send API requests, assert on responses, store values in variables, and chain them with browser steps. For ephemeral environments, that lets you seed a bit of data through an API call, then verify the UI against the exact deployment URL without switching tools.
A practical deployment flow
The basic flow has four stages.
- Deploy the branch to a review environment
- Capture the public URL or authenticated base URL
- Trigger the Endtest smoke suite with that URL as an Endtest test variable
- Stop or cancel the run if the environment is destroyed before the run completes
Here is the safer integration pattern.
After the review app is deployed and responding, obtain the complete start-execution request from Get API Request in Endtest.
If the Endtest test needs the temporary review-app URL, append it as a test variable such as reviewAppUrl. The test can then use $reviewAppUrl when navigating to the ephemeral environment.
The request should use the API format documented by Endtest rather than guessed REST conventions, authentication schemes, payload formats, or undocumented execution parameters.
If you are hardcoding branch URLs inside a saved test, you are making the test harder to reuse and harder to tear down cleanly.
A smoke suite structure that stays small
For review apps, I would usually split checks into three layers.
1. Deployment liveness
A fast network probe or health endpoint call. This is not a browser test, but it prevents noisy failures.
2. Browser shell check
One Endtest flow that opens the review app URL and validates the shell:
- page title or heading
- authenticated landing state if relevant
- one key UI element that proves hydration or rendering completed
- no blocking toast, modal, or error page
3. One functional path
One path that uses the app as a user would, or uses API setup followed by a browser assertion. Endtest’s mixed UI and API steps are useful here because you can prepare data through an API request and then verify the UI shows the result.
This layered structure reduces the chance that a single flaky step makes the whole review app gate meaningless.
Stopping runs when the environment disappears
Ephemeral environments fail in a specific way, the app vanishes while a browser run is still executing. If the test keeps running after the review app is deleted, the result is usually noise, not insight.
The operational fix is to map environment teardown to test cleanup.
Cleanup pattern
- Record the Endtest execution hash when you trigger the suite
- Store that execution hash alongside the pull request or deployment record
- On branch close, environment destroy, or manual cancel, call the documented Endtest
stopTestaction using the execution hash - Mark the CI job as canceled or skipped, depending on your deployment policy
Endtest provides a way to stop a test through its API-oriented workflow, which is exactly the capability you need here. The important part is not the syntax, it is the lifecycle coupling: when the environment goes away, the browser job should also go away.
For cleanup, use the documented stopTest action from the Endtest API with the appId, appCode, and execution hash returned when the test was started.
The important lifecycle rule is simple: if the ephemeral environment disappears while the browser test is still running, stop that Endtest execution as part of the teardown process.
Failure cleanup, retries, and false positives
The most expensive failure mode in review app testing is a run that fails for reasons unrelated to the code under review.
Common sources of noise
- The app URL is not yet ready
- Authentication cookies are not available in the environment you launched from
- Shared test accounts have stale sessions
- A background job has not populated the expected data yet
- The branch was merged or closed before the run finished
What to do about them
- Put a short readiness probe before the browser suite
- Use a dedicated smoke account or branch-safe auth flow
- Keep test data setup explicit, preferably via API steps
- Avoid long waits, if the app needs 60 seconds to warm up, solve that in the deployment pipeline
- Treat branch-close cleanup as a first-class path, not an exception path
Retries deserve caution. A single retry can be useful for transient browser startup issues, but retries should not hide a deployment that fails to produce a stable URL. If the review app cannot stay alive long enough for a smoke test, the deployment pipeline needs attention, not more retries.
How to keep the workflow lightweight for preview branches
Review apps work best when the smoke gate has a low operational cost. That cost is not just test runtime, it includes debug time, ownership, and the friction of making changes.
What keeps the workflow manageable:
- One or two reusable Endtest suites rather than many branch-specific tests
- Explicit environment variables for URLs and credentials
- Small assertions that do not require frequent editing
- Human-readable steps that non-authors can inspect during triage
- API-triggered runs so CI can control execution rather than waiting for a manual click
Endtest’s editable, platform-native steps are useful here because they lower the maintenance tax compared with throwing generated framework code at every preview branch. If the review app changes weekly, the test layer should be easy to understand, diff, and repair.
Where a different tool may be a better fit
Endtest is the right fit when you want browser smoke coverage with API-triggered runs, reusable suites, and mixed API plus UI steps in one place. A serious competitor can be a better fit when the problem is different.
- Cypress is often the better choice when your team already lives in JavaScript, wants close-to-code control, and is comfortable maintaining a framework-centric test stack.
- BrowserStack may fit better if the review-app problem is really a browser/device matrix problem and you need a cloud testing platform centered on cross-browser execution.
- Applitools is the stronger option when the primary goal is visual validation, not smoke gating.
The decision usually turns on ownership model. If you want a short-lived branch environment to be verified by a small, reusable, human-readable smoke suite, Endtest is aligned with that workflow. If you need a code-first framework with deep custom logic, a framework like Cypress may be a better fit.
A simple decision table
| Situation | Better choice | Why |
|---|---|---|
| Short-lived review app, one or two critical checks | Endtest | API-triggered smoke suite, reusable steps, easy runtime URL injection |
| Heavy custom logic in the test layer | Cypress | Code-first control for complex branching and bespoke helpers |
| Cross-browser matrix is the main concern | BrowserStack | Browser cloud emphasis, broader execution surface |
| Visual diffs are the gate | Applitools | Visual testing is the primary job |
Implementation checklist
- Define a single smoke suite for the review-app gate
- Keep the app URL outside the suite and inject it at runtime
- Add a readiness probe before the browser run
- Trigger Endtest through the API from CI
- Store the run ID so teardown can stop in-flight runs
- Cancel or stop runs when the branch or environment is deleted
- Keep smoke assertions narrow and move broader coverage to a separate regression suite
Not the best fit if
- You need one framework to cover deep application-specific programming logic
- Your team wants all test behavior expressed in code rather than platform-native steps
- The smoke gate must include broad regression coverage, not just deployment validation
- Your review app lifecycle is inconsistent, and you cannot reliably capture the URL before teardown
Bottom line
If your goal is to run Endtest smoke checks against review apps without turning preview branches into a maintenance sink, the winning pattern is simple: keep the suite tiny, inject the environment URL at runtime, use the API to trigger and manage runs, and stop the run when the environment disappears. That gives frontend, QA, and DevOps teams a practical browser layer that matches the lifecycle of ephemeral deployments instead of fighting it.
FAQ
Can I use one Endtest suite for staging and review apps?
Yes. Keep the base URL and credentials externalized, then inject the environment-specific values at runtime. That is the cleanest way to avoid duplicating smoke coverage across environments.
Should the review app gate use only browser checks?
No. A short readiness probe before the browser run reduces noise. Endtest is the browser validation layer, not a substitute for deployment health checks.
What should I do if the review app is destroyed during a run?
Store the Endtest run ID and call the stop action described in the API docs during teardown. If your CI job knows the branch was closed, cleanup should happen automatically.
Is Endtest better for smoke checks or full regression?
Its workflow is a better fit for smoke checks and small end-to-end validations in this scenario. Full regression is usually a separate suite with broader coverage and different maintenance expectations.
Can Endtest combine API setup and UI verification in one flow?
Yes. The product docs describe sending API requests, storing response values, and chaining them with browser steps in the same test. That is useful when a review app needs a little fixture setup before the UI check starts.
Where do I look for CI integration examples?
Start with the Endtest docs for GitLab CI/CD, Jenkins, and the general API documentation.