How to run browser tests in GitHub Actions

Run saved browser tests against a known environment, keep the result tied to the commit and make the merge policy explicit.

Why this is hard to test

  • •CI needs reachable environments and credentials.
  • •A test result can become stale as a PR changes.
  • •A comment alone does not enforce a merge policy.

Plan the test around an observable outcome

  1. 1.Prepare a stable staging app and test fixtures.
  2. 2.Choose the tests that should block a merge.
  3. 3.Preserve run output even when the test command fails.
  4. 4.Require the workflow in branch protection.

Where Zerocheck fits

  1. 1.Start with reviewed tests and add their YAML to your repository.
  2. 2.Authenticate the CLI and run zerocheck init --github-actions.
  3. 3.Configure the project token and environment credentials in CI.
  4. 4.Use the generated run and report steps to upload results and update one PR comment.

Understand the exit status

The CLI exits 1 for a blocking failed test, or for a blocking flaky test when --fail-on-flaky is enabled. Setup, configuration, policy and infrastructure errors use exit 2. A nonblocking test keeps its failure visible while leaving the merge decision to the configured policy.

Where results appear

The web app receives results and artifacts from CLI runs. GitHub Actions reporting updates one PR comment when it has the necessary token and permissions; a read-only or fork job still retains the job summary. Browser recordings are available only when the environment has no configured credentials.

Common pitfalls

  • —Do not assume the workflow can reach a private app without network setup.
  • —Do not give a PR comment credit for enforcing branch protection.
  • —Do not hide nonblocking failures from reviewers.

FAQ

Does Zerocheck install a GitHub App?

The supported workflow uses the optional CLI and GitHub Actions. Generate the workflow and configure the required token and environment.

Can CI tests use a local browser?

Yes. The local runner executes on your CI machine while still using Zerocheck’s AI service and uploading results.

How to run browser tests in GitHub Actions

Describe a customer flow or paste your release checklist, review the browser result, and save the tests you want to rerun.

Get a demo