Skip to Content
·

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 --name flag 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
  • ensure plugin 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: true

Configuration options

OptionTypeDefaultDescription
webhookUrlstringSlack incoming webhook URL. Required.
notifyOnFailureOnlybooleanfalseWhen 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.yml

To 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.yml
Last updated on