See llms.txt for all machine-readable content.

Back to Templates

Run synthetic regression tests for webhook and HTTP API workflows

Quick overview

This workflow exposes a webhook that runs a synthetic test suite against a target workflow, calls HTTP endpoints to execute and fetch results, performs an AI-based assertion/comparison, stores the outcome, and returns a structured pass/fail test report to the requester.

How it works

  1. Receives a POST request on a webhook endpoint to start a workflow test run.
  2. Validates the request, sets the target workflow details, and generates default synthetic test cases and expected results when none are provided.
  3. Sends an HTTP request to execute the target workflow using the synthetic test-case payload.
  4. Sends another HTTP request to fetch execution outputs, logs, and status for the test run.
  5. Sends an HTTP request to an AI assertion endpoint to compare actual results against expected outputs and detect regressions.
  6. Sends an HTTP request to store the test results (optionally updating the regression baseline) and returns a final test report with per-case pass/fail and an overall HTTP status.

Setup

  1. Expose the webhook and configure your test runner or client to POST to the generated webhook URL with at least a targetWorkflowId.
  2. Replace the placeholder httpbin.org URLs for execute/results/assert/store with your real endpoints (for example, n8n REST API endpoints and your assertion/storage services) and add any required authentication headers.
  3. If your execution, assertion, or storage endpoints require credentials (API keys or OAuth), create them in n8n and attach them to the HTTP Request steps, then adjust the request payloads to match your target workflow’s expected input and result format.