Slack Integration

Magic Inspector can send alerts when your tests fail directly to your Slack workspace. This guide will walk you through the process of setting up a Slack webhook and adding it to a channel.

Creating a Slack Webhook

The first step is to create a Slack app and enable incoming webhooks.

  1. Create a Slack App:

    • Go to https://api.slack.com/apps
    • Click on "Create New App"
    • Choose "From scratch"
    • Give your app a name (such as "Magic Inspector") and select your workspace
  2. Enable Incoming Webhooks:

    • In the app left navigation, navigate to "Incoming Webhooks"
    • Toggle "Activate Incoming Webhooks" to On
  3. Create a New Webhook:

    • Scroll down and click "Add New Webhook to Workspace"
    • Choose the channel where you want to receive Magic Inspector alerts
    • Click "Allow" to give the app permission to post to the channel
  4. Copy the Webhook URL:

    • After creating the webhook, you'll see a new entry in the "Webhook URLs for Your Workspace" section
    • Copy the webhook URL (it should start with "https://hooks.slack.com/")

Adding the Webhook to Magic Inspector

  1. Log in to your Magic Inspector account
  2. Navigate to the Integrations or Alerts Settings section
  3. Find the Slack integration and click on "Add"
  4. Give a name to your integration (e.g. "Slack Alerting") and a description (e.g. "Send alerts to the Magic Inspector channel")
  5. Paste the webhook URL you copied earlier
  6. Make sure to Enable the integration and click on "Save"

Testing the Integration

After setting up the integration, you can test it to ensure it's working correctly:

  1. Run a test in Magic Inspector
  2. Check the designated Slack channel for the alert

You should now receive real-time notifications in your Slack channel whenever one of your tests fails.

Slack Integration Demo

Remember to keep your webhook URL secure, as it can be used to post messages to your Slack channel.

Was this page helpful?