Test-Lab.aiDocs

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

  1. Go to api.slack.com/apps and sign in to your workspace.
  2. Click Create New AppFrom scratch.
  3. Give it a name (e.g. Test-Lab Notifications) and pick the workspace.
  4. In the left sidebar under Features, click Incoming Webhooks.
  5. Toggle Activate Incoming Webhooks to On.
  6. Scroll to the bottom and click Add New Webhook to Workspace.
  7. Pick the channel that will receive notifications. Click Allow.
  8. 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

  1. Go to DashboardProjects → click the project you want to notify on.
  2. Click the Edit (pencil) icon next to an environment (or create a new one).
  3. In the Notifications section, find the Slack card.
  4. Paste the webhook URL into Slack incoming webhook URL.
  5. 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)
  6. Click Send test message to verify the URL works. A sample card should land in your Slack channel within seconds.
  7. 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:

StatusEmojiTitleWhat it means
completedTest Run CompletedRun finished, all assertions passed
failed🔴Test Run FailedRun 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
timeoutTest Run Timed OutRun 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".

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-incidents channel, Failed runs only
  • staging env → #qa-runs channel, 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_url is 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 env is 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.

Next Steps

On this page

Slack Notifications | Test-Lab.ai