w3resource

Slack Integration


This tutorial will cover how to install Cypress Slack app, the configuration you need to do, as well as how to add or remove a channel.

Slack Integration

The Slack Integration permits you to see your Cypress test results directly in your team’s slack channels.

Install the Cypress Slack app

You have to be either an admin or owner of both your Cypress Dashboard organization and Slack workspace for you to install the Slack Integration.

To install the Slack Integration:

  1. You will need to go to the Dashboard Organization page or you open the organization switcher.
  2. Then you have to select the organization you wish to integrate with Slack.
  3. You will then have to visit the selected organization’s Integration page via the side navigation.
  4. Then click on the Install Slack Integration button.
  5. Once you have done these, you will see a popup window that requests permission for Cypress to access the workspace and then permits you to choose your workspace and channel to associate with the installation. Once you have selected a channel and allowed access, the installation will be completed! Now the Cypress Dashboard will post run results for all projects in your organization to the specified Slack channel.

Per-organization configuration

You can configure the Cypress Dashboard to post run results to additional channels. To do this you will need to:

  1. Navigate to the Integration page for the organization that has Slack integration.
  2. Then inside the organization, you need to click Configure.
  3. Click on the Add Slack Channel.
  4. When you do the above, you will see a popup window that will allow you to choose the channel to associate with the organization. The Cypress Organization will now post run results for all projects in your organization to the new Slack channel.

Set notification preferences

The Cypress Dashboard will post a Slack message to each configures channel for only failing runs by default. If you want to change these preferences:

  1. You will need to navigate to the Integration page for the organization with the installed Slack integration.
  2. Then click on Configure inside the Slack integration.
  3. Under the Notifications, you will need to select your preference for each Slack channel:
    • Choosing All runs, will notify you for all runs; including passed runs.
    • Choosing Failed runs only, will only notify you for failing runs.

Mute a channel

You can mute a channel, if you want it to temporarily stop posting slack messages to a certain channel. You can pause and resume notifications for a specific channel without losing the configuration that you have set.

  1. First step to this, is to navigate to the Integrations page for the organization with the installed Slack integration.
  2. Then, click Configure within the Slack integration.
  3. Select Mute for each Slack channel you want to mute under Actions.

Remove a Slack Channel

Aside Stopping the Cypress Dashboard from posting notification to a channel, you can also remove all Slack channels if you would prefer to disable global notification altogether in favor of per-project notifications.

  1. First step is to navigate to the Integrations page for the organization with the installed Slack integration.
  2. Then, click Configure within the Slack integration.
  3. Then select Delete for each Slack channel that you want to be deleted under Actions

Per-project configuration

If your organization has multiple teams that work on separate projects, you can configure the Slack notifications of each project to match your team’s need.

Add a new Slack channel

You can configure the Cypress Dashboard to post run results for a specific project to an additional channel.

  1. Select your organization in the organization switcher.
  2. Select the project that you want to integrate with Slack.
  3. Go to the settings page for the project.
  4. Scroll down to the Slack Integration section on the page.
  5. Click on Add Slack Channel.
  6. You will see a popup window that permits you to choose the channel to associate with the project.

Set notification preferences

The Cypress Dashboard will post a Slack message to each configures channel for only failing runs by default. You will not be able to override the notification preferences for the global organizations channels. If you want to change these preferences:

  1. You will need to navigate to the Integration page for the organization with the installed Slack integration.
  2. Then click on Configure inside the Slack integration.
  3. Under the Notifications, you will need to select your preference for each Slack channel:
    • Choosing All runs, will notify you for all runs; including passed runs.
    • Choosing Failed runs only, will only notify you for failing runs.

Mute a channel

You can mute a channel, if you want it to temporarily stop posting slack messages to a certain channel. You can pause and resume notifications for a specific channel without losing the configuration that you have set.

  1. First step to this, is to navigate to the Integrations page for the organization with the installed Slack integration.
  2. Then, click Configure within the Slack integration.
  3. Select Mute for each Slack channel you want to mute under Actions.

Remove a Slack Channel

Aside Stopping the Cypress Dashboard from posting notification to a channel, you can also remove all Slack channels if you would prefer to disable global notification altogether in favor of per-project notifications.

  1. First step is to navigate to the Integrations page for the organization with the installed Slack integration.
  2. Then, click Configure within the Slack integration.
  3. Then select Delete for each Slack channel that you want to be deleted under Actions

Remove the integration

You can remove the Slack integration from your workspace completely. This will remove the @cypress bot from your workspace and will delete all the configurations you have set in the Cypress Dashboard. To do this:

  1. You will need to navigate to the integration page for the organization with the installed Slack integration.
  2. Then click on the Configure, within the Slack Integration.
  3. Finally, click on Uninstall Slack Integration to uninstall the Slack Integration.