Slack Integration
What you'll learn​
- How to install the Cypress integration for Slack
- How to configure Slack notifications on failed runs, passed runs, and flaky tests
- How to manage Slack notifications at the organization and project level
Cypress's Slack integration provides real-time results for your Cypress tests, all in one place - improving remote collaboration and giving wider visibility into test failures and flake, UI Coverage, and Cypress Accessibility results.
The Cypress integration for Slack allows you to:
- Improve cross-team collaboration by instantly surfacing Cypress results to the teams that need visibility
- Confirm that key tests pass prior to launching new products or features
- Reduce the time it takes to catch failed tests
Getting Started​
You need three things to get started:
- A Cypress Cloud account
- The ability to configure Cypress Cloud integrations - you must be an admin or the owner of your Cypress Cloud organization.
- The ability to authorize Slack apps - by default, Slack allows any workspace member to authorize apps, however workspace owners may require app approvals before installation. See this Slack help article for more details.
Install the Cypress app for Slack​
- In the Cypress Cloud, visit the Integrations page for the organization you wish to integrate with Slack.
- Click the Enable button in the Slack section.
- A popup window will be displayed requesting permission for Cypress to access the workspace.
- After you approve the app permissions, you can choose your Slack workspace and channel to associate with the installation.
Now Cypress will post run results for all projects in your organization to the specified Slack channel.
Slack configuration​
The Slack messages can be tailored to match your teams' needs. A few options include:
- Sending results to one or more public or private Slack channels or directly to a specific user.
- Set notification preferences for when and where run results should be posted.
- Configure at the organization-level and/or project-level to support multiple teams working on separate projects.
Per-Organization vs per-project configuration​
The following describes where to go to configure Slack for an organization and a project.
Organization settings​
Configure Slack for the organization:
- Navigate to the Integrations page for the organization you wish to configure.
- Within the Slack integration, click Configure.
- Configure the app.
Project settings​
Configurate Slack for a project:
- Navigate to the Project Settings page for the project you wish to configure.
- Click on the Integrations tab within the Project Settings page.
- Configure the app with the Slack Integration section.
Slack channels​
You can have Cypress Cloud post run results to specific channels. To add a channel:
- Navigate to the Slack configuration page.
- Click Add Slack Channel.
- You'll see a popup window that allows you to choose the channel or individual to associate with the organization.
- Search for and selecting the channel messages should post to.
Cypress Cloud will begin to post run results to the channel.
Direct messages​
You can have Cypress Cloud post run results as a direct message to a single user. To post to a direct message:
- Navigate to the Slack configuration page
- Click Add Slack Channel.
- You'll see a popup window that allows you to choose the channel or individual to associate with the organization.
- Search for and select the user that messages should be sent to.
Cypress Cloud will begin to send run results to this user.
Notification preferences​
By default, Cypress Cloud will post a Slack message to each configured channel only for failing runs. However, you can select any combination of the followings preferences:
- Failed runs: will notify on runs with a failed status.
- Passed runs: will notify on runs with a passed status.
- Flaky tests: will notify on runs that have an identified flaky test.
To set notification preferences:
- Navigate to Slack configuration page
- Select the notification preferences for each channel
Filter notifications by tag​
When configuring at the project-level, you can filter notifications posted to Slack based on a tag the run was recorded with. This can be helpful to only post notifications on certain runs, like those to a staging or release environment.
- Navigate to the Slack configuration page
- Under Tags, select the Tag dropdown for the desired integration and select which tag to filter.
Mute a channel​
If you want Cypress Cloud to temporarily stop posting Slack messages to a certain channel, you can Mute that channel. This allows you to easily pause and resume notifications for a specific channel without losing the configuration you've put in place.
- Navigate to the Slack configuration page
- Under Actions, select Mute for each Slack channel you want muted.
Remove a Slack channel​
You can have Cypress Cloud stop posting notifications to a channel. You can remove all Slack channels if you'd prefer to disable global notifications altogether in favor of per-project notifications.
- Navigate to the Slack configuration page
- Under Actions, select Delete for each Slack channel you want deleted.
Remove the integration​
You can completely remove the Cypress integration for Slack from your workspace.
This will remove the @cypress
bot from your workspace and will delete all of the
Slack configurations you've set in Cypress Cloud. You cannot undo this, but you
will be able to install the Cypress integration for Slack again in the future.
- Navigate to the Integrations page for the organization with the installed integration.
- Within the Slack Integration, click Configure.
- Click Uninstall Slack Integration to uninstall the Cypress integration for Slack.
Security and compliance​
Review our Privacy Policy for information about how the Cypress app for Slack collects and manages your information.
Authorizations​
When authorized, Cypress can:
- View information about a user's identity
- Post messages to specific channels in Slack & direct message conversations
- Show previews of cloud.cypress.io URLs in messages
- View URLs from cloud.cypress.io
App scopes​
- User token scopes:
links:read
,links:write
- Bot token scopes:
chat:write
,incoming-webhook
,links:read
,links:write