Allows Dullahan to send messages to Slack.
Install this plugin:
yarn add @k2g/dullahan-plugin-slack
Note: Our documentation uses yarn
commands, but npm
will also work. You can compare yarn
and npm
commands in the yarn docs, here.
Now that the plugin is installed, you can add it to your Dullahan configuration file:
export default {
plugins: [
'@k2g/dullahan-plugin-slack'
]
}
name | type | default | description |
---|---|---|---|
webhook | string | DULLAHAN_SLACK_WEBHOOK , SLACK_WEBHOOK |
The webhook generated by Slack to be used |
channel | string | - | The channel (or private user chat) to be used (must start with # or @ ) |
mention | string | - | Used to mention a user, channel or workspace ('@here', '@channel' or '@everyone') |
when | string | 'always' | Choose from 'always', 'failure' or 'success' |
maxPreviews | number | 3 | The maximum amount of failed tests that should be previewed in Slack |
slowTestThreshold | number | 60000 | A successful test should be considered a slow test if it took more than the specified number of milliseconds to complete |
attachments | object | {} | An object of key-value pairs to be added to the message as attachments |
To change any of these options, pass along an object containing the options you wish to change to Dullahan:
export default {
plugins: [
['@k2g/dullahan-plugin-slack', {
channel: '#dullahan-results',
attachments: {
Browser: 'Google Chrome',
System: 'Windows 10',
Cat: 'Dog'
}
}]
]
}
- @k2g/dullahan-plugin-aws-s3 can be used to have screenshots visible in the Slack message.
- @k2g/dullahan-plugin-report-html can be used to have an HTML report linked to in the Slack message.
- @k2g/dullahan-plugin-report-markdown can be used to have a Markdown report linked to in the Slack message.
- @k2g/dullahan-plugin-report-json can be used to have a JSON report linked to in the Slack message.
- @k2g/dullahan-plugin-browserstack can be used to have a link to the Browserstack build in the Slack message.
Question: Can I send multiple messages using this plugin?
Answer: Yes, simply create a second entry for this plugin in your config and give it the options that you'd like.
This plugin is licensed under GPL-3.0.