Slack Reporter Reporter
wdio-slack-reporter is a 3rd party package, for more information please see GitHub | npm
Reporter from WebdriverIO using Incoming webhook and Web API to send results to Slack.
This package is Compatible with WebdriverIO version 6.x and above.
Slack notification screenshot

WebdriverIO 4.x or lower Compatibility
This project is Compatible with WebdriverIO version 6.x and above.
If you are using 4.x or lower, use to wdio-slack-reporter.
Installation
The easiest way is to keep @moroo/wdio-slack-reporter
as a devDependency in your package.json
.
{
"devDependencies": {
"@moroo/wdio-slack-reporter": "8.1.0"
}
}
You can simple do it by:
- NPM
npm install @moroo/wdio-slack-reporter --save-dev
- Yarn
yarn add -D @moroo/wdio-slack-reporter
Instructions on how to install WebdriverIO
can be found here.
Configuration
At the top of the wdio.conf.js-file, add:
ES6
// wdio.conf.js
import SlackReporter from '@moroo/wdio-slack-reporter';
In order to use the reporter you need to add slack to your reporters array in wdio.conf.js
// wdio.conf.js
export.config = {
reporters: [
[
SlackReporter,
{
slackOptions: {
type: 'web-api',
channel: process.env.SLACK_CHANNEL || 'Cxxxxxxxxxx',
slackBotToken: process.env.SLACK_BOT_TOKEN || 'xoxb-xxxxxxxxxx-xxxxxx...',
},
}
],
],
};
Configuration Options
The following configuration options are supported.
For notifications to be sent, You must set webhook
or web-api
.
If both web-api
and webhook
are set, web-api
is used.
Webhook (Incoming Webhook)
webhook (Required
)
Incoming Webhook of the slack channel to which notifications should be sent. If the URL is not configured, notifications will not be sent.
- Scope:
webhook
- Type:
string