Testing Staging Environment
This guide walks through testing a staging environment deployed on your own infrastructure. You will use a saved Staging environment and a signed group webhook to trigger tests after deployment. Results always appear in TesterArmy and can also appear as a GitHub Check Run when GitHub is connected.
Prerequisites
- A project with tests organized in a group.
- A saved Staging environment. See Environments if you need to create one, or create it from the CLI with
ta projects environments-create <projectId> --name Staging --url https://staging.example.com. - Optional: connect GitHub when you want a commit Check Run.
1. Create a test group webhook
- Open your project → Tests tab.
- Expand the group you want to run against staging.
- Click the trigger badge (lightning icon).
- Toggle Enable webhook on.
- Copy the webhook URL - the secret is shown once.
The URL looks like:
See Group Webhooks for more details.
2. Trigger after deployment
Once your staging deployment completes, call the webhook with the commit SHA. If the SHA belongs to the repository connected to this TesterArmy project, TesterArmy creates a best-effort GitHub Check Run.
GitHub Actions
Add the saved Staging environment ID to your repository secrets as TESTERARMY_STAGING_ENVIRONMENT_ID, then add a step after your deployment job:
Add these to your repository secrets (Settings -> Secrets and variables -> Actions):
TESTERARMY_WEBHOOK_URL- the full webhook URL including the secret.TESTERARMY_STAGING_ENVIRONMENT_ID- the saved Staging environment ID from Project Settings -> Test environments.
TesterArmy uses the saved staging URL and any staging-specific credential overrides attached to that environment.
Without a saved environment
If you do not want to save Staging in TesterArmy, pass a one-off targetUrl and label the result as staging:
This only sets the run URL and Results label. It does not apply saved environment credential overrides.
3. View results
When tests finish, results appear in TesterArmy and can also appear in GitHub:
- TesterArmy dashboard - always contains full run details with screenshots and logs.
- GitHub - contains a Check Run only when the GitHub App is connected and the SHA belongs to the connected repository.
How commitSha works
Without commitSha, TesterArmy still runs the tests but cannot attach a result to a GitHub commit. When GitHub is connected and the SHA resolves:
- Tests are queued against
projectEnvironmentIdortargetUrlwhen provided, otherwise the project’s configured URL. - A pending check run is created on the commit.
- When tests complete, the check run updates with the batch summary.
Troubleshooting
No check run appears on GitHub
- GitHub App not connected - verify installation in Project Settings.
- Missing or unrelated
commitSha- the webhook still runs tests, but cannot create a check unless the SHA belongs to the connected repository. - Permissions - the GitHub App needs Checks: Read & Write.
Tests run against the wrong URL
Tests run against projectEnvironmentId or targetUrl if provided in the webhook body, otherwise the URL configured in your project settings. Make sure the selected saved environment or URL points to staging.
