Skip to main content

Feature comparison

Each column combines a way to run this package with a way to connect to Slack. Reporter means it runs as part of your Playwright test run, configured in playwright.config.ts. CLI (command-line interface) means you run npx playwright-slack-report separately, using a saved or merged Playwright JSON report and its own JSON configuration file.

  • Reporter + webhook: automatically sends results when tests finish, using an incoming webhook URL tied to a Slack channel.
  • Reporter + bot: automatically sends results when tests finish, using a Slack bot token. It can post to multiple channels and put details in threads.
  • CLI + webhook: sends an existing JSON report through an incoming webhook URL when you run the command. You do not need to configure the Slack reporter in Playwright.
  • CLI + bot: sends an existing JSON report using a Slack bot token when you run the command, with support for multiple channels and threads.

Features by modeโ€‹

FeatureReporter + webhookReporter + botCLI + webhookCLI + bot
Send automatically when a Playwright run finishesYesYesSeparate commandSeparate command
Send an existing or merged Playwright JSON reportNoNoYesYes
Send to multiple channels in one invocationNoYesNoYes
Route to different channels for success and failureNoYesNoNo
Send only on failures (on-failure)YesYesYesYes
Send only when flaky tests occur (on-flaky)YesYesYesYes
Disable sending with sendResults: 'off'YesYesNoNo
Show failure and flaky-test details inlineYesYesYesYes
Put failure, run-error, and flaky-test details in a threadNoYesNoYes
Split custom layout blocks into a threadNoYesNoYes
Limit displayed failure and flaky-test detailsYesYesYesYes
Custom layouts, including async layoutsYesYesYesYes
Metadata such as branch, build, and report linksYesYesYesYes
HTTP proxy configurationYesYesYesYes
Disable link previews (disableUnfurl)YesYesYesYes
Report global errors and overall run statusAutomaticAutomaticJSON + status overrideJSON + status override
  • Webhooks send to one configured destination per invocation. Bot delivery accepts a list of channels.
  • Success/failure channel routing uses the reporter's onSuccessChannels and onFailureChannels. The CLI bot uses a fixed sendUsingBot.channels list.
  • on-failure skips flaky-only runs; on-flaky sends whenever at least one flaky test is present, including mixed failure/flaky runs.
  • The CLI reads errors and test outcomes from JSON. Use --run-status passed|failed|timedout|interrupted when the overall status cannot be inferred, such as a global timeout.
  • Detail limits apply to the default layout. Custom layouts control which details they display.

Choose a modeโ€‹

  • Use the reporter with an incoming webhook for a summary in one channel after each test run.
  • Use the reporter with a Slack bot for multiple channels, success/failure routing, or threaded details.
  • Use the CLI to send existing JSON results or one combined summary after merging sharded reports. Choose bot delivery if you need multiple channels or threads.

Configuration namesโ€‹

The reporter takes options in playwright.config.ts; the CLI reads a separate JSON configuration file.

SettingReporterCLI
Webhook URLslackWebHookUrlsendUsingWebhook.webhookUrl
Bot channelschannelssendUsingBot.channels
Bot tokenslackOAuthToken or SLACK_BOT_USER_OAUTH_TOKENSLACK_BOT_USER_OAUTH_TOKEN
Failure detail limitmaxNumberOfFailuresToShow (default: 10)maxNumberOfFailures (default: 5)
Flaky-test detail limitmaxNumberOfFlakyTestsToShow (default: 10)maxNumberOfFlakyTests (default: 10)
Synchronous custom layoutlayout callbackcustomLayout.source and customLayout.functionName
Asynchronous custom layoutlayoutAsync callbackcustomLayoutAsync.source and customLayoutAsync.functionName
Environment values in metadataRead process.env in the configUse __ENV_VARIABLE_NAME values

Both modes use sendResults, meta, proxy, and disableUnfurl. Bot delivery also supports showInThread and sendCustomBlocksInThreadAfterIndex. Configure exactly one Slack connection per invocation.

See Reporter configuration, CLI and sharded runs, and Custom layouts for examples.