Testing Staging Environment
This guide walks through testing a staging environment deployed on your own infrastructure. You'll use group webhooks with a commitSha to trigger tests after deployment and get results as GitHub commit check runs.
Prerequisites
- GitHub App installed and connected to your repository.
- A project with tests organized in a group.
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 and click Save.
- Copy the webhook URL - the secret is shown once.
The URL looks like:
https://tester.army/api/v1/groups/webhook/{id}/{secret}See Group Webhooks for more details.
2. Trigger after deployment
Once your staging deployment completes, call the webhook with the commit SHA. This links test results to the commit on GitHub as a check run.
GitHub Actions
Add a step after your deployment job:
- name: Run TesterArmy tests
run: |
curl -X POST "${{ secrets.TESTERARMY_WEBHOOK_URL }}" \
-H "Content-Type: application/json" \
-d "{\"commitSha\":\"${{ github.sha }}\",\"targetUrl\":\"${{ secrets.TESTERARMY_TARGET_URL }}\"}"Add these to your repository secrets (Settings -> Secrets and variables -> Actions):
TESTERARMY_WEBHOOK_URL- the full webhook URL including the secret.TESTERARMY_TARGET_URL- staging environment URL (e.g.https://staging.myapp.com).
targetUrl is optional - if omitted, tests run against the URL configured in your project settings.
3. View results
When tests finish, results appear in two places:
- GitHub - a commit check run on the SHA, visible in the PR checks tab.
- TesterArmy dashboard - full run details with screenshots and logs.
How commitSha works
Without commitSha, TesterArmy runs the tests but has no way to report back to GitHub. Passing it enables the integration:
- Tests are queued against the project's configured URL.
- A pending check run is created on the commit.
- When tests complete, the check run updates to success or failure with a link to the full results.
Troubleshooting
No check run appears on GitHub
- GitHub App not connected - verify installation in Project Settings.
- Missing
commitSha- the webhook still runs tests, but can't post results to GitHub without it. - Permissions - the GitHub App needs Checks: Read & Write.
Tests run against the wrong URL
Tests run against targetUrl if provided in the webhook body, otherwise the URL configured in your project settings. Make sure one of them points to your staging environment.