sorry-cypress
  • Documentation
  • Guide
    • Get Started
    • Dashboard and API
    • Cloud Setup
  • Cloud
    • AWS
      • Basic AWS Setup
      • Advanced AWS Setup
      • AWS Networking
      • AWS S3 Manual Setup
    • Google Cloud
      • Google Cloud & MinIO - Deprecated
    • Microsoft Azure
    • Heroku
    • Kubernetes
    • Docker Images
  • Integrating Cypress
    • Integration options
    • cy2 - Deprecated
    • Agent Configuration - Deprecated
    • CLI One Liners - Deprecated
  • Configuration
    • Basic Setup
    • Full Setup
    • Director Service
      • AWS Role Assumption via Service Account
      • AWS S3 Configuration
      • Minio Configuration
      • Azure Blob Storage Configuration
    • API Service
    • Web Dashboard
      • Configuration
    • MongoDB Configuration
    • Troubleshooting
  • Integrations
    • Events
    • Webhooks
    • Slack Integration
    • GitHub Integration
    • BitBucket Integration
    • MS Teams Integration
  • Concepts
    • Parallelization Explained
    • Flaky Tests
    • Test Details
    • Test Status
  • CI
    • GitHub Actions
    • Travis
    • Jenkins
    • AWS Codebuild
  • Development
    • Changelog
    • Development Guide
  • Community Content
  • ❤️ Contributions
  • Support
  • Legal
  • FAQ
Powered by GitBook
On this page
Edit on GitHub
  1. Integrations

Webhooks

PreviousEventsNextSlack Integration

Last updated 2 years ago

Sorry-cypress will send a POST HTTP request to a URL with a JSON payload.

// Payload schema
{
  event: "INSTANCE_FINISH" | "INSTANCE_START" | "RUN_START" | "RUN_FINISH";
  runUrl: string;
  failures: number;
  passes: number;
  skipped: number;
  tests: number;
  pending: number;
  wallClockDurationSeconds: number;
}

Use the web dashboard Project Settings to add or edit Generic Webhook Integration

If you are using the in-memory director and do not have a dashboard you can add webhooks to your project via a POST to /hooks route to your director. Ensure your "projectId" matches that in your cypress.json or cypress.config.js that you wish to add hooks to. Note this will replace all the hooks for the given projectId.

//Example POST body to localhost:1234/hooks

{
  "projectId": "test",
  "hooks": [
    {
      "hookId": "1",
      "headers": "{\"some\":\"thing\"}",
      "url": "http://localhost:3005",
      "hookEvents": [
        "INSTANCE_FINISH",
        "RUN_FINISH"
      ],
      "hookType": "GENERIC_HOOK"
    }
  ]
}