/n8n-trigger-testing-strategies
Webhook testing, schedule validation, event-driven triggers, and polling mechanism testing for n8n workflows. Use when testing how workflows are triggered.
$ npx -y skills add proffesor-for-testing/agentic-qe --skill n8n-trigger-testing-strategies --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/n8n-trigger-testing-strategies
Context preview
The summary Claude sees to decide when to auto-load this skill.
Webhook testing, schedule validation, event-driven triggers, and polling mechanism testing for n8n workflows. Use when testing how workflows are triggered.
SKILL.md
n8n-trigger-testing-strategies.SKILL.mdname: n8n-trigger-testing-strategies
description: "Webhook testing, schedule validation, event-driven triggers, and polling mechanism testing for n8n workflows. Use when testing how workflows are triggered."
category: n8n-testing
priority: high
tokenEstimate: 1000
agents: [n8n-trigger-test]
implementation_status: production
optimization_version: 1.0
last_optimized: 2025-12-15
dependencies: []
quick_reference_card: true
tags: [n8n, triggers, webhook, schedule, cron, polling, testing]
trust_tier: 3
validation:
schema_path: schemas/output.json
validator_path: scripts/validate-config.json
eval_path: evals/n8n-trigger-testing-strategies.yaml
n8n Trigger Testing Strategies
<default_to_action> When testing n8n triggers: 1. IDENTIFY trigger type (webhook, schedule, polling, event) 2. TEST with various valid payloads 3. VERIFY authentication and authorization 4. CHECK error handling for invalid inputs 5. MEASURE response time and reliability
**Quick Trigger Checklist:**
- Trigger activates workflow correctly
- Payload parsed and validated
- Authentication enforced (if configured)
- Error responses are informative
- Response time is acceptable
**Critical Success Factors:**
- Test edge cases (empty payloads, large payloads)
- Verify idempotency where needed
- Check timeout handling
- Monitor for missed triggers
</default_to_action>
Quick Reference Card
n8n Trigger Types
| Type | Use Case | Testing Focus | |------|----------|---------------| | **Webhook** | External HTTP calls | Payloads, auth, methods | | **Schedule** | Timed execution | Cron accuracy, timezone | | **Polling** | Check for changes | Interval, deduplication | | **Event** | Service events | Event handling, filtering |
Common Webhook Configurations
| Setting | Options | Impact | |---------|---------|--------| | HTTP Method | GET, POST, PUT, DELETE | Request handling | | Authentication | None, Basic, Header | Security | | Response Mode | Immediately, Last Node, Custom | Response timing | | Path | Custom URL path | Endpoint identification |
---
Webhook Testing
Basic Webhook Test
// Test webhook with various payloads
async function testWebhook(webhookUrl: string): Promise<WebhookTestResult> {
const testPayloads = [
// Valid JSON
{ type: 'json', data: { event: 'test', timestamp: Date.now() } },
// Empty object
{ type: 'empty', data: {} },
// Large payload
{ type: 'large', data: { items: Array(1000).fill({ id: 1, name: 'test' }) } },
// Nested data
{ type: 'nested', data: { level1: { level2: { level3: { value: 'deep' } } } } },
// Special characters
{ type: 'special', data: { text: 'Hello <script>alert("xss")</script>' } }
];
const results: PayloadTestResult[] = [];
for (const payload of testPayloads) {
const startTime = Date.now();
try {
const response = await fetch(webhookUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload.data)
});
results.push({
payloadType: payload.type,
success: response.ok,
status: response.status,
responseTime: Date.now() - startTime,
responseBody: await response.text()
});
} catch (error) {
results.push({
payloadType: payload.type,
success: false,
error: error.message
});
}
}
return { webhookUrl, results };
}HTTP Method Testing
// Test all HTTP methods
async function testWebhookMethods(webhookUrl: string): Promise<MethodTestResult[]> {
const methods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'];
const results: MethodTestResult[] = [];
for (const method of methods) {
try {
const response = await fetch(webhookUrl, {
method,
headers: { 'Content-Type': 'application/json' },
body: ['GET', 'HEAD', 'OPTIONS'].includes(method) ? undefined : '{}'
});
results.push({
method,
allowed: response.ok || response.status !== 405,
status: response.status,
statusText: response.statusText
});
} catch (error) {
results.push({
method,
allowed: false,
error: error.message
});
}
}
return results;
}Authentication Testing
// Test webhook authentication
async function testWebhookAuth(webhookUrl: string, authConfig: AuthConfig): Promise<AuthTestResult> {
const scenarios = [
// No auth
{ name: 'no-auth', headers: {} },
// Invalid auth
{ name: 'invalid-auth', headers: { 'Authorization': 'Bearer invalid-token' } },
// Valid auth
{ name: 'valid-auth', headers: { 'Authorization': `Bearer ${authConfig.token}` } },
// Expired auth
{ name: 'expired-auth', headers: { 'Authorization': `Bearer ${authConfig.expiredToken}` } }
];
const results: AuthScenarioResult[] = [];
for (const scenario of scenarios) {
const response = await fetch(webhookUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
...scenario.headers
},
body: '{}'
});
results.push({
scenario: scenario.name,
status: response.status,
authenticated: response.ok,
errorMessage: response.ok ? null : await response.text()
});
}
return {
authRequired: !results.find(r => r.scenario === 'no-auth')?.authenticated,
invalidRejected: !results.find(r => r.scenario === 'invalid-auth')?.authenticated,
validAccepted: results.find(r => r.scenario === 'valid-auth')?.authenticated,
results
};
}---
Schedule Testing
Cron Expression Validation
// Validate cron expression
function validateCronExpression(expression: string): CronValidationResult {
const parts = expression.trim().split(/\s+/);
if (parts.length < 5 || parts.length > 6) {
return {
valid: false,
error: `Expected 5-6 parts, got ${parts.lengthRead more
name: n8n-trigger-testing-strategies description: "Webhook testing, schedule validation, event-driven triggers, and polling mechanism testing for n8n workflows. Use when testing how workflows are triggered." category: n8n-testing priority: high tokenEstimate: 1000 agents: [n8n-trigger-test] implementation_status: production optimization_version: 1.0 last_optimized: 2025-12-15 dependencies: [] quick_reference_card: true tags: [n8n, triggers, webhook, schedule, cron, polling, testing] trust_tier: 3 validation: schema_path: schemas/output.json validator_path: scripts/validate-config.json eval_path: evals/n8n-trigger-testing-strategies.yaml
n8n Trigger Testing Strategies
<default_to_action> When testing n8n triggers: 1. IDENTIFY trigger type (webhook, schedule, polling, event) 2. TEST with various valid payloads 3. VERIFY authentication and authorization 4. CHECK error handling for invalid inputs 5. MEASURE response time and reliability
**Quick Trigger Checklist:**
- Trigger activates workflow correctly
- Payload parsed and validated
- Authentication enforced (if configured)
- Error responses are informative
- Response time is acceptable
**Critical Success Factors:**
- Test edge cases (empty payloads, large payloads)
- Verify idempotency where needed
- Check timeout handling
- Monitor for missed triggers
</default_to_action>
Quick Reference Card
n8n Trigger Types
| Type | Use Case | Testing Focus | |------|----------|---------------| | **Webhook** | External HTTP calls | Payloads, auth, methods | | **Schedule** | Timed execution | Cron accuracy, timezone | | **Polling** | Check for changes | Interval, deduplication | | **Event** | Service events | Event handling, filtering |
Common Webhook Configurations
| Setting | Options | Impact | |---------|---------|--------| | HTTP Method | GET, POST, PUT, DELETE | Request handling | | Authentication | None, Basic, Header | Security | | Response Mode | Immediately, Last Node, Custom | Response timing | | Path | Custom URL path | Endpoint identification |
---
Webhook Testing
Basic Webhook Test
// Test webhook with various payloads
async function testWebhook(webhookUrl: string): Promise<WebhookTestResult> {
const testPayloads = [
// Valid JSON
{ type: 'json', data: { event: 'test', timestamp: Date.now() } },
// Empty object
{ type: 'empty', data: {} },
// Large payload
{ type: 'large', data: { items: Array(1000).fill({ id: 1, name: 'test' }) } },
// Nested data
{ type: 'nested', data: { level1: { level2: { level3: { value: 'deep' } } } } },
// Special characters
{ type: 'special', data: { text: 'Hello <script>alert("xss")</script>' } }
];
const results: PayloadTestResult[] = [];
for (const payload of testPayloads) {
const startTime = Date.now();
try {
const response = await fetch(webhookUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload.data)
});
results.push({
payloadType: payload.type,
success: response.ok,
status: response.status,
responseTime: Date.now() - startTime,
responseBody: await response.text()
});
} catch (error) {
results.push({
payloadType: payload.type,
success: false,
error: error.message
});
}
}
return { webhookUrl, results };
}HTTP Method Testing
// Test all HTTP methods
async function testWebhookMethods(webhookUrl: string): Promise<MethodTestResult[]> {
const methods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'];
const results: MethodTestResult[] = [];
for (const method of methods) {
try {
const response = await fetch(webhookUrl, {
method,
headers: { 'Content-Type': 'application/json' },
body: ['GET', 'HEAD', 'OPTIONS'].includes(method) ? undefined : '{}'
});
results.push({
method,
allowed: response.ok || response.status !== 405,
status: response.status,
statusText: response.statusText
});
} catch (error) {
results.push({
method,
allowed: false,
error: error.message
});
}
}
return results;
}Authentication Testing
// Test webhook authentication
async function testWebhookAuth(webhookUrl: string, authConfig: AuthConfig): Promise<AuthTestResult> {
const scenarios = [
// No auth
{ name: 'no-auth', headers: {} },
// Invalid auth
{ name: 'invalid-auth', headers: { 'Authorization': 'Bearer invalid-token' } },
// Valid auth
{ name: 'valid-auth', headers: { 'Authorization': `Bearer ${authConfig.token}` } },
// Expired auth
{ name: 'expired-auth', headers: { 'Authorization': `Bearer ${authConfig.expiredToken}` } }
];
const results: AuthScenarioResult[] = [];
for (const scenario of scenarios) {
const response = await fetch(webhookUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
...scenario.headers
},
body: '{}'
});
results.push({
scenario: scenario.name,
status: response.status,
authenticated: response.ok,
errorMessage: response.ok ? null : await response.text()
});
}
return {
authRequired: !results.find(r => r.scenario === 'no-auth')?.authenticated,
invalidRejected: !results.find(r => r.scenario === 'invalid-auth')?.authenticated,
validAccepted: results.find(r => r.scenario === 'valid-auth')?.authenticated,
results
};
}---
Schedule Testing
Cron Expression Validation
// Validate cron expression
function validateCronExpression(expression: string): CronValidationResult {
const parts = expression.trim().split(/\s+/);
if (parts.length < 5 || parts.length > 6) {
return {
valid: false,
error: `Expected 5-6 parts, got ${parts.lengthAI-powered quality engineering agents that generate tests, find coverage gaps, detect flaky tests, and learn your codebase patterns — across 11 coding agent platforms.
Repo: proffesor-for-testing/agentic-qe
Other skills on agentic-qe.
- /a11y-ally
Use when running comprehensive WCAG accessibility audits with axe-core + pa11y + Lighthouse, generating context-aware remediation, or testing video accessibility. Supports 3-tier browser cascade with graceful degradation.
Open skill - /accessibility-testing
WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification. Use when ensuring legal compliance (ADA, Section 508), testing for disabilities, or building accessible applications for 1 billion disabled users globally.
Open skill - /agentdb-advanced
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.
Open skill - /agentdb-learning
Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more. Use when building self-learning agents, implementing RL, or optimizing agent behavior through experience.
Open skill - /agentdb-memory-patterns
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.
Open skill - /agentdb-optimization
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors.
Open skill

