Skip to main content

Overview

Playwright Slack Report sends your Playwright test results to the Slack channels where your team works. Use it as a reporter that runs with your tests, or as a CLI that publishes an existing Playwright JSON report after your CI jobs finish.

Example Slack report

Features​

  • Channel delivery: send a summary through an incoming webhook, or use a Slack bot to post to one or more channels.
  • Conditional notifications: report every run, only unsuccessful runs, or only runs containing flaky tests. Bot reports can route successful and unsuccessful runs to different channels.
  • Flaky test details: show test names and actual retry counts, with optional on-flaky alerts.
  • Run-level failures: report global errors, timeouts, and graceful interruptions, even when no individual test failed.
  • Readable details: limit failure and flaky details, or use a bot to put them in a thread beneath the summary.
  • Build context: include metadata such as branch, build ID, commit, and links to reports.
  • Custom layouts: create Slack Block Kit messages with synchronous or asynchronous callbacks, including examples for screenshots and videos.
  • CLI and sharding: publish Playwright JSON results, including one merged report from multiple shards.
  • Transport configuration: configure proxies, logging, and link unfurling.

Choose when to publish​

WorkflowUse it whenStart here
Playwright reporterYou want a Slack report when a test run finishes. Configure it in playwright.config.ts.Getting started
Standalone CLIYou already have JSON results, or want to merge shards and publish once from a separate CI step. It uses its own configuration file.CLI and sharded runs

Choose how to connect Slack​

Both workflows support webhooks and bots. Choose one connection per report.

CapabilityIncoming webhookSlack bot
CredentialsWebhook URLBot User OAuth Token
DestinationChannel selected when creating the webhookOne or more configured channels
Conditional notificationsYesYes
Separate success/failure destinationsUse a bot for thisReporter supports channel routing
Failure, global error, and flaky detailsInlineInline or in a thread
Metadata and custom layoutsYesYes
Setup guideIncoming webhooksSlack bot setup

For a detailed comparison of all four reporter/CLI and webhook/bot combinations, see Feature comparison.

Your path to a first report​

  1. Check prerequisites and install the package.
  2. Create a webhook or bot using the connection guides above.
  3. Add the reporter configuration and run your tests.
  4. Adjust notification rules, metadata, and detail limits.
  5. Explore the CLI or custom layouts as your needs grow.

To work on the package itself, see Contributing, including the consumer harness and website development guides.