Overview
Stably provides flexible notification options to keep your team informed about test results. Configure notifications at the project level in yourplaywright.config.ts file.
Configuration
Using Stably’s defineConfig
ImportdefineConfig from @stablyai/playwright-test to get proper TypeScript typings for Stably-specific configuration:
playwright.config.ts
Using Stably’s
defineConfig is fully compatible with Playwright. We just add extra types for Stably-specific features!Notification Types
Email Notifications
Send test results via email to team members:playwright.config.ts
Slack Notifications
Post test results to a Slack channel:playwright.config.ts
Slack integration must be configured in your Stably dashboard settings before channels will receive notifications.
Combined Notifications
Configure both email and Slack notifications:playwright.config.ts
Project-Specific Notifications
Different projects can have different notification settings:playwright.config.ts
Notification Content
Stably notifications include:Test Run Summary
Test Run Summary
- Total tests executed
- Pass/fail counts
- Test duration
- Project name and run information
Failure Details
Failure Details
For failed tests:
- Test name and location
- Error message and stack trace
- Screenshot (when available)
- Link to detailed results in dashboard
Contextual Information
Contextual Information
- Commit SHA (when run from CI)
- Branch name
- PR number (for PR runs)
- Environment information
Quick Actions
Quick Actions
- View full results in dashboard
- Rerun failed tests
- Compare with previous runs
Use Cases
- Production Monitoring
- Team Notifications
- Release Validation
- Developer Feedback
Alert the on-call team immediately when critical tests fail:
Integration Setup
Slack Integration
Install Slack App
Navigate to Integrations > Slack in your Stably dashboard
Configure in playwright.config.ts
Add the channel name to your project configuration using
channelNameEmail Setup
Email notifications work automatically. Just specify recipient email addresses in your configuration.Best Practices
Target the Right People
Send notifications to the teams responsible for each test category
Use Separate Channels
Create dedicated Slack channels for different test types to avoid noise
Critical Tests First
Prioritize notifications for critical path and production monitoring tests
Balance Frequency
Avoid alert fatigue by configuring appropriate notification frequency
Troubleshooting
Notifications Not Working
Notifications Not Working
Problem: Configured notifications are not being sentSolution:
- Make sure you’re using
npx stably test— notifications do not work withnpx playwright test - If you haven’t logged in via
stably login, verifySTABLY_API_KEYandSTABLY_PROJECT_IDenvironment variables are set - Check that the
stablyconfig is properly nested under your project configuration
Slack Notifications Not Arriving
Slack Notifications Not Arriving
Problem: Configured Slack channel not receiving notificationsSolution:
- Verify the Stably bot is invited to the channel
- Check
channelNamematches exactly (including#) - Ensure Slack integration is connected in dashboard
- Verify the channel is public or the bot has access
Email Notifications Not Received
Email Notifications Not Received
Problem: Email recipients not getting notificationsSolution:
- Check spam/junk folders
- Verify email addresses are correct in configuration
- Ensure emails are properly formatted
- Check email provider isn’t blocking notifications
Too Many Notifications
Too Many Notifications
Problem: Team overwhelmed by notification volumeSolution:
- Use
notifyOnResult: 'failures-only'to only notify on failures - Disable
notifyOnStartif start notifications aren’t needed - Configure notifications only for critical test projects
Configuration Reference
Notification Schema
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
to | string[] | — | (Email only) Array of recipient email addresses |
channelName | string | — | (Slack only) The Slack channel to post notifications to (include #) |
notifyOnStart | boolean | false | Send a notification when the test run begins |
notifyOnResult | "all" | "failures-only" | "all" | Control when result notifications are sent: "all" sends for every run, "failures-only" sends only when tests fail |
Complete Example
playwright.config.ts
npx stably test.