·
slack - Send notifications to a Slack channel
Artillery’s Slack integration enables getting real-time Artillery test run updates to a Slack channel of your choice.
Slack message format
The plugin sends a message to the configured Slack channel when the test completes. The message includes the following information:
- Whether the test run was successful or failed (based on the exit code)
- The test name, taken from the
--nameflag or derived from the test script filename - Test duration
- The link to the test run view in Artillery Cloud dashboard (if recorded to Artillery Cloud)
- VUs completed / created
- Errors
ensureplugin checks if set
Usage
Configure the plugin
To enable the plugin, add it to the config section of a test script, and provide the webhookUrl for the Slack channel you want to send messages to.
config:
target: "http://lab.artillery.io"
plugins:
slack:
webhookUrl: "https://hooks.slack.com/services/..."
notifyOnFailureOnly: trueConfiguration options
| Option | Type | Default | Description |
|---|---|---|---|
webhookUrl | string | — | Slack incoming webhook URL. Required. |
notifyOnFailureOnly | boolean | false | When set to true, the plugin only posts to Slack if the test run failed. Successful runs are silenced. |
Debugging
To enable debug logging for the plugin, set the DEBUG environment variable to plugin:slack.
DEBUG=plugin:slack artillery run my-test.ymlTo inspect the message payload without sending it to Slack, set the ARTILLERY_SLACK_PLUGIN_DEBUG environment variable. The plugin will print the payload to the console instead of making an HTTP request to the webhook URL.
ARTILLERY_SLACK_PLUGIN_DEBUG=1 artillery run my-test.ymlLast updated on