N8n cli test fixtures

From 8Dvibes/n8n-cli · View interactive version

N8n cli test fixtures is an AI agent skill from the GitHub repository 8Dvibes/n8n-cli. Generate realistic test payloads for n8n webhook workflows. Infers input schema and creates happy-path, edge-case, and error fixtures. Use when adding tests to an existing workflow or building one TDD-style.

How to use this skill

Skill file

/n8n-cli-test-fixtures — Generate Test Payloads for Webhook Workflows

Read a webhook-triggered workflow, infer the input shape, and generate a set of realistic test payloads (happy path + edge cases + error cases).

Procedure

  1. Get the workflow:
  1. Infer the input shape:
  1. Generate fixtures (3-5 of each):
  1. Save fixtures to tests/<workflow-name>/fixtures/:

```

tests/

order-webhook/

fixtures/

01-happy-path-standard-order.json

02-happy-path-international-order.json

03-edge-empty-customer-name.json

04-edge-very-long-product-name.json

05-error-missing-product-id.json

06-error-invalid-email.json

07-security-sql-injection.json

```

  1. Generate a test runner script (tests/<workflow-name>/run.sh) that loops through the fixtures and posts each one with n8n-cli wh test:

```bash

#!/bin/bash

set -e

for fixture in fixtures/*.json; do

echo "▶ $fixture"

n8n-cli wh test <workflow-id> --data "$(cat $fixture)"

sleep 1

done

```

  1. Print usage to the user:

```

Generated 7 fixtures and a runner script in tests/order-webhook/

Run all tests: cd tests/order-webhook && bash run.sh

Run one fixture: n8n-cli wh test <id> --data "$(cat fixtures/01-happy-path-standard-order.json)"

```

Output format

Tips

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.