Slack Service
wdio-slack-service is a 3rd party package, for more information please see GitHub | npm
A WebdriverIO service which sends notifications of test results to Slack.
Installation#
The easiest way is to keep wdio-slack-service as a devDependency in your package.json.
You can simple do it by:
Instructions on how to install WebdriverIO can be found here.
Configuration#
At the top of the wdio.conf.js-file, add:
In order to use the service you need to add slack to your services array in wdio.conf.js
Configuration Options#
The following configuration options are supported and are all optional. By default none of the config options are set.
For notifications to be sent webhook option should atleast be set.
| Option | Description |
|---|---|
| webhook | URL - Incoming webhook of the slack channel to which notifications should be sent. If the URL is not configured, notifications will not be sent. |
| notifyOnlyOnFailure | Set this option to true to send notifications only when there are test fail, else nothing will be sent. |
| message | Title of text message which appears in the notification. |
