Slack Notifications
Get test run results posted to your Slack channel with rich formatting and clickable build links
Slack Notifications
Test-Lab can post a formatted message to a Slack channel every time a run finishes. Each message tells you, at a glance, whether the test ran-and-passed, ran-and-failed (real regression), or didn't complete at all (timeout / incomplete / out of credits).
What you get
Each notification carries:
- Status header with a distinct emoji per outcome (see the status reference below)
- Project, Environment, Test Plan, Run Mode (AI vs Script)
- Build ID – optionally rendered as a clickable link to your CI build (see Build ID links)
- Error block with the actual failure message (for non-success states)
- View Run button linking to the full run report in Test-Lab
Setup
Configuring Slack notifications is a two-step flow: create an Incoming Webhook URL in Slack, then paste it into the environment's notification config in Test-Lab.
Step 1 – Create a Slack Incoming Webhook
- Go to api.slack.com/apps and sign in to your workspace.
- Click Create New App → From scratch.
- Give it a name (e.g.
Test-Lab Notifications) and pick the workspace. - In the left sidebar under Features, click Incoming Webhooks.
- Toggle Activate Incoming Webhooks to On.
- Scroll to the bottom and click Add New Webhook to Workspace.
- Pick the channel that will receive notifications. Click Allow.
- Copy the Webhook URL (looks like
https://hooks.slack.com/services/T.../B.../xxxxxx).
Treat this URL like a password: anyone holding it can post to that channel. Never commit it to version control.
Step 2 – Paste it into Test-Lab
- Go to Dashboard → Projects → click the project you want to notify on.
- Click the Edit (pencil) icon next to an environment (or create a new one).
- In the Notifications section, find the Slack card.
- Paste the webhook URL into Slack incoming webhook URL.
- Choose Notify on:
- All runs – fires for every terminal status (passed and failed)
- Failed runs only – fires only for non-completed states (failed, incomplete, timeout, credits exhausted)
- Click Send test message to verify the URL works. A sample card should land in your Slack channel within seconds.
- Save the environment.
That's it. The next test run against this environment will post to your channel.
Slack URLs are stored encrypted in Test-Lab's database. They're only ever sent server-to-server when a notification fires; the Test-Lab UI never re-displays the full URL once saved.
Status visuals
Each terminal state gets its own emoji + title so you can scan a channel and immediately tell what happened:
| Status | Emoji | Title | What it means |
|---|---|---|---|
completed | ✅ | Test Run Completed | Run finished, all assertions passed |
failed | 🔴 | Test Run Failed | Run finished, assertions caught a real regression |
incomplete | ⚠️ | Test Run Incomplete (no result) | Agent ran but couldn't produce a final report |
credits_exhausted | 💳 | Test Run Stopped (credits exhausted) | Account ran out of credits mid-run |
timeout | ⏳ | Test Run Timed Out | Run hung past the 20-minute deadline |
The non-success states are NOT all the same. A 🔴 failed run means a regression was caught, which is signal you can act on. A ⚠️ incomplete / ⏳ timeout / 💳 credits exhausted run means the scenario was never actually tested – don't mistake those for "all green on prod".
Build ID links
If you trigger runs from CI and pass a buildId, the Build field in the Slack message can render as a clickable link to your CI's build page.
To enable this, set a Build ID URL template on the environment. Use the literal token {buildId} where the build ID should be substituted:
https://ci.acme.com/builds/{buildId}
https://github.com/acme/myapp/actions/runs/{buildId}
https://app.circleci.com/pipelines/github/acme/myapp/{buildId}Test-Lab URL-encodes the buildId value before substitution so build IDs containing /, ?, or # don't break the link.
The template field validates HTTPS-only and rejects templates missing the {buildId} token.
Notification gating
Each channel (HTTP Webhook, Slack, Teams) has its own Notify on setting:
- All runs – every terminal status fires a notification, including ✅ completed
- Failed runs only – only non-completed statuses fire (
failed,incomplete,credits_exhausted,timeout)
The default for new Slack/Teams configs is Failed runs only to keep noise down. The default for HTTP Webhooks is All runs for backward compatibility with CI integrations that need every result.
Multiple environments, multiple channels
Each environment owns its own Slack URL. A common setup:
- prod env →
#prod-incidentschannel, Failed runs only - staging env →
#qa-runschannel, All runs - uat env → no Slack (HTTP webhook only, posted to JIRA)
Test-Lab routes the notification based on which env the run targeted.
Troubleshooting
Send test message returns "HTTP 404"
The webhook URL is invalid or the Slack app was deleted. Recreate the Incoming Webhook in the Slack app settings.
Send test message returns "channel_not_found"
The channel was archived or the bot was removed. In the Slack app's Incoming Webhooks page, Add New Webhook to Workspace for a different channel.
"Send test message" succeeds but nothing arrives
- Check the channel selected when creating the webhook – Slack scopes each webhook URL to a single channel.
- Look for a private app/bot in the channel's member list. If missing, the workspace admin may have restricted app installations.
Real test runs don't fire Slack but the test button works
- Verify the env's
slack_webhook_urlis saved (re-open the editor and confirm the URL is shown) - Check
Notify on– if set to Failed runs only, completed runs will be silently skipped - Confirm the run was triggered against the right environment (the API/UI uses the project's default env when
envis omitted)
What HTTP webhook receivers see
The HTTP webhook payload doesn't include the Slack-specific extras (run mode, project name, env name, build ID URL). Those are computed at chat-send time only. See Webhooks for the full HTTP payload shape.