What you’ll learn
- How to connect the TestDino Slack App via OAuth
- How to configure run summaries with environment-based channel routing
- How to set up annotation-based alerts for specific test failures
- How to route alerts by Playwright tag with per-rule environments, triggers, and filters
How does it work?
- Sends run summaries (status, counts, duration, environment/branch, author, commit).
- Routes notifications by environment to specific channels; unmatched events fall back to a default channel.
- Sends annotation-based alerts when tests with
testdino:notify-slackfail, routed to specific channels or users. - Sends tag-based notifications when a run contains tests carrying configured Playwright tags, with per-rule environments, triggers, and filters.
- Supports test posts for verification and quick reconfiguration.
Installation & Setup
1. Connect Slack
In Project → Integrations → Slack App, click Connect to Slack and complete the OAuth flow.
After connecting, the Slack App card shows the connected status with your workspace name.
2. Configure channel routing
After connecting, click the ⚙️ icon on the Slack App card to open the Slack Notification Configuration dialog. The Test Run Alerts tab has two sections: Default Channel: Set a fallback channel that receives all test run alerts. Any run that doesn’t match an environment-specific channel is routed here. Environment Channels: Assign specific Slack channels to your project environments (e.g., PROD →#td-prod, STAGE → #td-stage). Runs on mapped environments route to their designated channel instead of the default.
3. Save and test
Click Save Configuration to apply your settings. Use the Test button next to any channel to send a sample message and verify it lands in the correct channel.
Who can editEditing the Slack Notification Configuration requires the Organization Admin or Owner role. This applies to all three tabs (Test Run Alerts, Annotation Alerts, and Tags Notification). Members and viewers see the configuration in read-only mode. They can still use Test to send a sample message, but Save, Add, Edit, and Delete are disabled.
Configuration Scenarios
The integration supports both default and environment-based channel configurations, giving you control over how alerts are delivered.1. Default Channel Only
All test run alerts, regardless of the branch or environment, are sent to a single default channel. This is useful for centralizing all notifications.2. Default + Environment-Specific Channels
Alerts for mapped environments (e.g., PROD Alerts) are sent to their designated channel (e.g., #prod-alerts). All alerts from unmapped branches or environments automatically fall back to the default channel (e.g., #daily-updates).Why this helps
- Reduce notification noise by routing alerts to environment-specific channels so teams see only relevant updates.
- Improve incident response by sending critical failure alerts directly to the responsible team’s channel.
- Enable faster triage with real-time summaries that link directly to detailed test evidence.
Annotation-Based Alerts
Beyond run-level alerts, the Slack App can notify specific channels or users when individual tests fail. This is driven by thetestdino:notify-slack annotation in your Playwright test code.
For example, if a test has testdino:notify-slack set to @ashish, and that test fails, TestDino sends a Slack message directly to Ashish. This is different from test run alerts, which fire on every run completion regardless of which tests failed.
How to set it up
- Add a
testdino:notify-slackannotation to your test with a channel (#e2e-alerts) or user (@ashish) as the target. - In the Slack Notification Configuration dialog, switch to the Annotation Alerts tab.
- Map each annotation target to a Slack channel or user from your workspace.
- Save the configuration.
See the Annotations guide for full setup instructions, code examples, and all supported annotation types.
NoteAnnotation-Slack mappings are stored at the integration level. If you disconnect the Slack App, all mappings are deleted and need to be set up again after reconnecting.
Tag-Based Notifications
Tag-based notifications route Slack alerts by Playwright tag. A rule watches one or more tags, such as@smoke or @critical, and posts a Slack message when a completed run contains matching tests. Each rule controls when it fires (Trigger On), which tests the message lists (Tests), and which environments it watches, so @critical failures from Production go to an incident channel while @smoke results from Staging go to a QA channel.
How to set it up
-
Tag your Playwright tests. Tags must include the leading
@.checkout.spec.ts -
In the Slack Notification Configuration dialog, switch to the Tags Notification tab.
-
Use the left Rules pane to manage your notification rules:
- Click Add to create a new rule.
- Select an existing rule to view or edit its configuration.
- Each rule can watch different tags, environments, filters, and destinations.
-
Configure the selected rule in the right details pane:
- Tags: one or more tags to watch. A test matches if it carries any of them.
- Scope → Environment: choose where this rule applies.
- Scope → Trigger On: choose when the rule fires.
- Filters → Tests: choose which type of tests to include in the message: all tests, failed, flaky, or failed/flaky.
- Destinations → Slack Channel / User: choose one or more Slack destinations.
- Save the configuration. Use the Test button on a rule to send a sample message to its destinations.
Rule configuration
The Tags Notification tab has two panes. The left Rules pane lists every rule for the project; select one to inspect it, or click Add to create a new one. The right pane configures the selected rule with these controls:| Control | Options | What it does |
|---|---|---|
| Tags | One or more @-prefixed tags | The Playwright tags this rule watches. A test matches if it carries any of them. |
| Environment | Any environment, or one or more mapped environments | Which branch environments the rule watches. Any fires for any run; a specific environment fires only when the run belongs to it. |
| Trigger On | Every Run, Failed Run | Whether the rule fires for every completed run, or only when the run has failures. |
| Tests | All Tests, Failed/Flaky Tests, Failed Tests, Flaky Tests | Which tagged tests the message lists: all of them, only failed or flaky, only failed, or only flaky. |
| Slack Channel / User | Up to 10 destinations | The Slack channels or users that receive the notification. |
@critical+ Production →#incident-response.@smoke+ Staging →#qa-review.@flaky+ Any environment →#test-stability.
Environment matchingEnvironment scope is based on the run’s branch environment mapping. If a rule is limited to Production, runs from branches mapped to Staging or Dev will not trigger that rule.
Potential Combinations
Trigger On and Tests combine into 8 behaviors. The table reads for a rule watching@smoke: Trigger On decides which runs post, Tests decides which tagged tests the message lists.
| Trigger On | Tests | Behavior |
|---|---|---|
| Every Run | All Tests | Posts on every run with @smoke tests, listing all of them. |
| Every Run | Failed/Flaky Tests | Posts on every run with @smoke tests, listing only failed or flaky ones. |
| Every Run | Failed Tests | Posts on every run with @smoke tests, listing only failed ones. |
| Every Run | Flaky Tests | Posts on every run with @smoke tests, listing only flaky ones. |
| Failed Run | All Tests | Posts only when the run has failures, listing all @smoke tests. |
| Failed Run | Failed/Flaky Tests | Posts only when the run has failures, listing only failed or flaky @smoke tests. |
| Failed Run | Failed Tests | Posts only when the run has failures, listing only failed @smoke tests. |
| Failed Run | Flaky Tests | Posts only when the run has failures, listing only flaky @smoke tests. |
Format & Limits
Tag format. When adding a tag in a rule:- It must start with
@(e.g.@smoke). - There must be no space right after the
@(@ smokeis rejected). - It cannot contain a backslash (
\). - Any other character is allowed, matching Playwright (e.g.
@#hdi,@[]hie).
@.
Limits per rule:
- Up to 20 tags.
- Up to 10 channels/users.
- Each message lists the first 10 matching tests; the total matched count still shows in the header.
How it’s Different from Slack Webhook
The Slack App provides three types of alerts:- Test Run Alerts send environment-aware run summaries when any run completes.
- Annotation-Based Alerts notify specific channels or users when individual annotated tests fail.
- Tag-Based Notifications route alerts by Playwright tag, with per-rule environments, triggers, and filters.
Troubleshooting
No messages appearing in Slack
No messages appearing in Slack
- Verify the Slack App is connected in Settings → Integrations → Slack
- Ensure at least one default channel is configured in the Slack Channel Configuration
- Use the Test button in the Slack settings to send a sample message and verify it lands in the correct channel
- Confirm a test run has completed after connecting (messages are sent on run completion)
Private channel not appearing in channel list
Private channel not appearing in channel list
- Private channels require the TestDino app to be added to the channel first. To add it:
- Open the private channel in Slack
- Click the channel name at the top to open channel details
- Go to the Integrations tab → click Add an App
- Search for TestDino. If you have already completed the OAuth connection, it appears under In Your Workspace. If not, it shows results from the Slack Marketplace. Complete the OAuth connection in TestDino first before adding the app to private channels.
- After adding TestDino to the channel, click the Refresh button in the TestDino Slack settings to fetch the updated channel list
- TestDino fetches all channels from your Slack workspace history. Deleted channels are excluded.
Messages going to wrong channel
Messages going to wrong channel
- Check the Environment Alert Channel Mapping in Slack settings. Runs on mapped environments route to their specific channel
- Unmapped environments fall back to the default channel
- Use the Test button to verify which channel receives messages for a given configuration
Annotation alerts not firing
Annotation alerts not firing
- Ensure the test has the
testdino:notify-slackannotation with a valid target (#channelor@user) - Verify the annotation target is mapped to a Slack channel or user in the Annotation Alerts tab
- Annotation alerts only fire when the annotated test fails, not on every run
Tag notifications not firing
Tag notifications not firing
- Confirm the run actually contains tests carrying the rule’s tags. A run with no matching tagged tests sends nothing
- Tags must match exactly, including the leading
@(e.g.@smoke, notsmoke) - Check the rule’s Environment scope. If it is not set to Any environment, the run must belong to one of the selected branch-mapped environments
- Verify the project has branch environment mappings configured for the branches you expect this rule to watch
- For a Failed Run + Failed/Flaky Tests rule, the run must have failures and the tagged tests must be failed or flaky
- Check the rule’s Trigger On and Tests filter. An Every Run rule fires on any completed run; a Failed Run rule only when the run fails
- For private channel destinations, make sure the TestDino bot is a member of the channel
OAuth connection failed
OAuth connection failed
- Ensure you have permission to install apps in the Slack workspace
- Try removing the TestDino app from Slack → Settings → Manage Apps and reconnecting from TestDino
Annotations Guide
Add metadata and Slack notification targets to tests
Slack Webhook
Single-channel webhook notifications