Skip to content

Slack#

Slack is a business communication platform that helps to chat, and collaborate in just one place.

Integration with Zebrunner allows users to configure notifications providing test run summary on its finish to desired channel(s).

Note: integration is supported on a per-project basis, meaning that different projects in Zebrunner can be connected to different Slack workspaces.

Preconditions#

  • Your Zebrunner account should have Administrator role within a project, where integration needs to be enabled.

Configuration#

The following steps needs to be completed to configure Slack integration:

  1. Log in to your Slack account and go to Your Apps API section Applications grid
  2. Press Create New App button, in the pop up dialog pick From scratch option Create application view
  3. In the next view enter an app name (e.g. Zebrunner) and select a workspace to develop your app in. Click Create App and proceed Create application from scratch view
  4. From Add features and functionality grid select Permissions Application features grid
  5. In Scopes section find Bot Token Scopes and click Add an OAuth Scope. Add chat:write and chat:write.public for writing messages to channels and chat:write.customize for changing bot name and avatar Bot Token Scopes
  6. Click Install to Workspace button and copy token from Bot User OAuth Token section. Bot Token
  7. Enter your token, bot icon and bot name to the corresponding fields and hit Save. Zebrunner Slack integration view

Integration is now configured. You can check if Slack is configured properly and reachable by clicking on Test button. Additionally, it can be enabled or disabled if needed by clicking power icon in the upper right corner.

Configuring test run notifications#

In order to configure notifications for test runs you'll have to provide additional parameters to reporting agent configuration.

REPORTING_NOTIFICATION_SLACK_CHANNELS environment variable should be available at runtime (e.g. REPORTING_NOTIFICATION_SLACK_CHANNELS=channel-01,channel-02. Alternatively, such configuration can be provided via .yaml or .properties configuration file, please see documentation for reporting agent you are using.

Note, that you can send notification to multiple channels - separate channel names with comma (e.g. channel-01,channel-02). Also if you need to send notifications to private channels you should add bot in these channels via /invite @yourBotName Slack chat command.

Once you'll have configuration in place you'll be able to see notifications on test run finish:

Notification example