Skip to main content
hitspec can notify your team about test results through Slack and Microsoft Teams webhooks. See Notifications for full details.

Slack

Setup

  1. Create a Slack Incoming Webhook
  2. Set the webhook URL as an environment variable or pass it via flag
hitspec run tests/ \
  --notify slack \
  --slack-webhook "$SLACK_WEBHOOK" \
  --notify-on failure

Configuration

FlagEnv VarDescription
--slack-webhookSLACK_WEBHOOKWebhook URL (required)
--slack-channelSLACK_CHANNELOverride default channel
--notify-onHITSPEC_NOTIFY_ONWhen to notify: always, failure, success, recovery

What You Get

The Slack notification includes:
  • Color-coded attachment (green for pass, red for fail)
  • Test count summary (total, passed, failed)
  • Duration
  • Environment name
  • Failed test details with error messages

Microsoft Teams

Setup

  1. Create a Teams Incoming Webhook
  2. Set the webhook URL as an environment variable or pass it via flag
hitspec run tests/ \
  --notify teams \
  --teams-webhook "$TEAMS_WEBHOOK" \
  --notify-on failure

Configuration

FlagEnv VarDescription
--teams-webhookTEAMS_WEBHOOKWebhook URL (required)
--notify-onHITSPEC_NOTIFY_ONWhen to notify

What You Get

The Teams notification uses an Adaptive Card with:
  • Summary title with pass/fail status
  • Column layout with test counts
  • Failed test details
  • Timestamp footer

Both Services

Send to both simultaneously:
hitspec run tests/ \
  --notify slack,teams \
  --slack-webhook "$SLACK_WEBHOOK" \
  --teams-webhook "$TEAMS_WEBHOOK" \
  --notify-on failure