agentic-qe 2.5.6 → 2.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/.claude/agents/n8n/n8n-base-agent.md +376 -0
  2. package/.claude/agents/n8n/n8n-bdd-scenario-tester.md +613 -0
  3. package/.claude/agents/n8n/n8n-chaos-tester.md +654 -0
  4. package/.claude/agents/n8n/n8n-ci-orchestrator.md +850 -0
  5. package/.claude/agents/n8n/n8n-compliance-validator.md +685 -0
  6. package/.claude/agents/n8n/n8n-expression-validator.md +560 -0
  7. package/.claude/agents/n8n/n8n-integration-test.md +602 -0
  8. package/.claude/agents/n8n/n8n-monitoring-validator.md +589 -0
  9. package/.claude/agents/n8n/n8n-node-validator.md +455 -0
  10. package/.claude/agents/n8n/n8n-performance-tester.md +630 -0
  11. package/.claude/agents/n8n/n8n-security-auditor.md +786 -0
  12. package/.claude/agents/n8n/n8n-trigger-test.md +500 -0
  13. package/.claude/agents/n8n/n8n-unit-tester.md +633 -0
  14. package/.claude/agents/n8n/n8n-version-comparator.md +567 -0
  15. package/.claude/agents/n8n/n8n-workflow-executor.md +392 -0
  16. package/.claude/skills/n8n-expression-testing/SKILL.md +434 -0
  17. package/.claude/skills/n8n-integration-testing-patterns/SKILL.md +540 -0
  18. package/.claude/skills/n8n-security-testing/SKILL.md +599 -0
  19. package/.claude/skills/n8n-trigger-testing-strategies/SKILL.md +541 -0
  20. package/.claude/skills/n8n-workflow-testing-fundamentals/SKILL.md +447 -0
  21. package/CHANGELOG.md +41 -0
  22. package/README.md +7 -4
  23. package/dist/agents/n8n/N8nAPIClient.d.ts +121 -0
  24. package/dist/agents/n8n/N8nAPIClient.d.ts.map +1 -0
  25. package/dist/agents/n8n/N8nAPIClient.js +367 -0
  26. package/dist/agents/n8n/N8nAPIClient.js.map +1 -0
  27. package/dist/agents/n8n/N8nAuditPersistence.d.ts +120 -0
  28. package/dist/agents/n8n/N8nAuditPersistence.d.ts.map +1 -0
  29. package/dist/agents/n8n/N8nAuditPersistence.js +473 -0
  30. package/dist/agents/n8n/N8nAuditPersistence.js.map +1 -0
  31. package/dist/agents/n8n/N8nBDDScenarioTesterAgent.d.ts +159 -0
  32. package/dist/agents/n8n/N8nBDDScenarioTesterAgent.d.ts.map +1 -0
  33. package/dist/agents/n8n/N8nBDDScenarioTesterAgent.js +697 -0
  34. package/dist/agents/n8n/N8nBDDScenarioTesterAgent.js.map +1 -0
  35. package/dist/agents/n8n/N8nBaseAgent.d.ts +126 -0
  36. package/dist/agents/n8n/N8nBaseAgent.d.ts.map +1 -0
  37. package/dist/agents/n8n/N8nBaseAgent.js +446 -0
  38. package/dist/agents/n8n/N8nBaseAgent.js.map +1 -0
  39. package/dist/agents/n8n/N8nCIOrchestratorAgent.d.ts +164 -0
  40. package/dist/agents/n8n/N8nCIOrchestratorAgent.d.ts.map +1 -0
  41. package/dist/agents/n8n/N8nCIOrchestratorAgent.js +610 -0
  42. package/dist/agents/n8n/N8nCIOrchestratorAgent.js.map +1 -0
  43. package/dist/agents/n8n/N8nChaosTesterAgent.d.ts +205 -0
  44. package/dist/agents/n8n/N8nChaosTesterAgent.d.ts.map +1 -0
  45. package/dist/agents/n8n/N8nChaosTesterAgent.js +729 -0
  46. package/dist/agents/n8n/N8nChaosTesterAgent.js.map +1 -0
  47. package/dist/agents/n8n/N8nComplianceValidatorAgent.d.ts +228 -0
  48. package/dist/agents/n8n/N8nComplianceValidatorAgent.d.ts.map +1 -0
  49. package/dist/agents/n8n/N8nComplianceValidatorAgent.js +986 -0
  50. package/dist/agents/n8n/N8nComplianceValidatorAgent.js.map +1 -0
  51. package/dist/agents/n8n/N8nContractTesterAgent.d.ts +213 -0
  52. package/dist/agents/n8n/N8nContractTesterAgent.d.ts.map +1 -0
  53. package/dist/agents/n8n/N8nContractTesterAgent.js +989 -0
  54. package/dist/agents/n8n/N8nContractTesterAgent.js.map +1 -0
  55. package/dist/agents/n8n/N8nExpressionValidatorAgent.d.ts +99 -0
  56. package/dist/agents/n8n/N8nExpressionValidatorAgent.d.ts.map +1 -0
  57. package/dist/agents/n8n/N8nExpressionValidatorAgent.js +632 -0
  58. package/dist/agents/n8n/N8nExpressionValidatorAgent.js.map +1 -0
  59. package/dist/agents/n8n/N8nFailureModeTesterAgent.d.ts +238 -0
  60. package/dist/agents/n8n/N8nFailureModeTesterAgent.d.ts.map +1 -0
  61. package/dist/agents/n8n/N8nFailureModeTesterAgent.js +956 -0
  62. package/dist/agents/n8n/N8nFailureModeTesterAgent.js.map +1 -0
  63. package/dist/agents/n8n/N8nIdempotencyTesterAgent.d.ts +242 -0
  64. package/dist/agents/n8n/N8nIdempotencyTesterAgent.d.ts.map +1 -0
  65. package/dist/agents/n8n/N8nIdempotencyTesterAgent.js +992 -0
  66. package/dist/agents/n8n/N8nIdempotencyTesterAgent.js.map +1 -0
  67. package/dist/agents/n8n/N8nIntegrationTestAgent.d.ts +104 -0
  68. package/dist/agents/n8n/N8nIntegrationTestAgent.d.ts.map +1 -0
  69. package/dist/agents/n8n/N8nIntegrationTestAgent.js +653 -0
  70. package/dist/agents/n8n/N8nIntegrationTestAgent.js.map +1 -0
  71. package/dist/agents/n8n/N8nMonitoringValidatorAgent.d.ts +210 -0
  72. package/dist/agents/n8n/N8nMonitoringValidatorAgent.d.ts.map +1 -0
  73. package/dist/agents/n8n/N8nMonitoringValidatorAgent.js +669 -0
  74. package/dist/agents/n8n/N8nMonitoringValidatorAgent.js.map +1 -0
  75. package/dist/agents/n8n/N8nNodeValidatorAgent.d.ts +142 -0
  76. package/dist/agents/n8n/N8nNodeValidatorAgent.d.ts.map +1 -0
  77. package/dist/agents/n8n/N8nNodeValidatorAgent.js +1090 -0
  78. package/dist/agents/n8n/N8nNodeValidatorAgent.js.map +1 -0
  79. package/dist/agents/n8n/N8nPerformanceTesterAgent.d.ts +198 -0
  80. package/dist/agents/n8n/N8nPerformanceTesterAgent.d.ts.map +1 -0
  81. package/dist/agents/n8n/N8nPerformanceTesterAgent.js +653 -0
  82. package/dist/agents/n8n/N8nPerformanceTesterAgent.js.map +1 -0
  83. package/dist/agents/n8n/N8nReplayabilityTesterAgent.d.ts +245 -0
  84. package/dist/agents/n8n/N8nReplayabilityTesterAgent.d.ts.map +1 -0
  85. package/dist/agents/n8n/N8nReplayabilityTesterAgent.js +952 -0
  86. package/dist/agents/n8n/N8nReplayabilityTesterAgent.js.map +1 -0
  87. package/dist/agents/n8n/N8nSecretsHygieneAuditorAgent.d.ts +325 -0
  88. package/dist/agents/n8n/N8nSecretsHygieneAuditorAgent.d.ts.map +1 -0
  89. package/dist/agents/n8n/N8nSecretsHygieneAuditorAgent.js +1187 -0
  90. package/dist/agents/n8n/N8nSecretsHygieneAuditorAgent.js.map +1 -0
  91. package/dist/agents/n8n/N8nSecurityAuditorAgent.d.ts +91 -0
  92. package/dist/agents/n8n/N8nSecurityAuditorAgent.d.ts.map +1 -0
  93. package/dist/agents/n8n/N8nSecurityAuditorAgent.js +825 -0
  94. package/dist/agents/n8n/N8nSecurityAuditorAgent.js.map +1 -0
  95. package/dist/agents/n8n/N8nTestHarness.d.ts +131 -0
  96. package/dist/agents/n8n/N8nTestHarness.d.ts.map +1 -0
  97. package/dist/agents/n8n/N8nTestHarness.js +456 -0
  98. package/dist/agents/n8n/N8nTestHarness.js.map +1 -0
  99. package/dist/agents/n8n/N8nTriggerTestAgent.d.ts +119 -0
  100. package/dist/agents/n8n/N8nTriggerTestAgent.d.ts.map +1 -0
  101. package/dist/agents/n8n/N8nTriggerTestAgent.js +652 -0
  102. package/dist/agents/n8n/N8nTriggerTestAgent.js.map +1 -0
  103. package/dist/agents/n8n/N8nUnitTesterAgent.d.ts +130 -0
  104. package/dist/agents/n8n/N8nUnitTesterAgent.d.ts.map +1 -0
  105. package/dist/agents/n8n/N8nUnitTesterAgent.js +522 -0
  106. package/dist/agents/n8n/N8nUnitTesterAgent.js.map +1 -0
  107. package/dist/agents/n8n/N8nVersionComparatorAgent.d.ts +201 -0
  108. package/dist/agents/n8n/N8nVersionComparatorAgent.d.ts.map +1 -0
  109. package/dist/agents/n8n/N8nVersionComparatorAgent.js +645 -0
  110. package/dist/agents/n8n/N8nVersionComparatorAgent.js.map +1 -0
  111. package/dist/agents/n8n/N8nWorkflowExecutorAgent.d.ts +120 -0
  112. package/dist/agents/n8n/N8nWorkflowExecutorAgent.d.ts.map +1 -0
  113. package/dist/agents/n8n/N8nWorkflowExecutorAgent.js +347 -0
  114. package/dist/agents/n8n/N8nWorkflowExecutorAgent.js.map +1 -0
  115. package/dist/agents/n8n/index.d.ts +119 -0
  116. package/dist/agents/n8n/index.d.ts.map +1 -0
  117. package/dist/agents/n8n/index.js +298 -0
  118. package/dist/agents/n8n/index.js.map +1 -0
  119. package/dist/agents/n8n/types.d.ts +486 -0
  120. package/dist/agents/n8n/types.d.ts.map +1 -0
  121. package/dist/agents/n8n/types.js +8 -0
  122. package/dist/agents/n8n/types.js.map +1 -0
  123. package/dist/cli/init/agents.d.ts.map +1 -1
  124. package/dist/cli/init/agents.js +29 -0
  125. package/dist/cli/init/agents.js.map +1 -1
  126. package/dist/cli/init/skills.d.ts.map +1 -1
  127. package/dist/cli/init/skills.js +7 -1
  128. package/dist/cli/init/skills.js.map +1 -1
  129. package/dist/core/memory/HNSWVectorMemory.js +1 -1
  130. package/dist/mcp/server-instructions.d.ts +1 -1
  131. package/dist/mcp/server-instructions.js +1 -1
  132. package/docs/reference/agents.md +91 -2
  133. package/docs/reference/skills.md +97 -2
  134. package/package.json +2 -2
@@ -0,0 +1,447 @@
1
+ ---
2
+ name: n8n-workflow-testing-fundamentals
3
+ description: "Comprehensive n8n workflow testing including execution lifecycle, node connection patterns, data flow validation, and error handling strategies. Use when testing n8n workflow automation applications."
4
+ category: n8n-testing
5
+ priority: high
6
+ tokenEstimate: 1200
7
+ agents: [n8n-workflow-executor, n8n-node-validator, n8n-trigger-test]
8
+ implementation_status: production
9
+ optimization_version: 1.0
10
+ last_optimized: 2025-12-15
11
+ dependencies: []
12
+ quick_reference_card: true
13
+ tags: [n8n, workflow, automation, testing, data-flow, nodes, triggers]
14
+ ---
15
+
16
+ # n8n Workflow Testing Fundamentals
17
+
18
+ <default_to_action>
19
+ When testing n8n workflows:
20
+ 1. VALIDATE workflow structure before execution
21
+ 2. TEST with realistic test data
22
+ 3. VERIFY node-to-node data flow
23
+ 4. CHECK error handling paths
24
+ 5. MEASURE execution performance
25
+
26
+ **Quick n8n Testing Checklist:**
27
+ - All nodes properly connected (no orphans)
28
+ - Trigger node correctly configured
29
+ - Data mappings between nodes valid
30
+ - Error workflows defined
31
+ - Credentials properly referenced
32
+
33
+ **Critical Success Factors:**
34
+ - Test each execution path separately
35
+ - Validate data transformations at each node
36
+ - Check retry and error handling behavior
37
+ - Verify integrations with external services
38
+ </default_to_action>
39
+
40
+ ## Quick Reference Card
41
+
42
+ ### When to Use
43
+ - Testing new n8n workflows
44
+ - Validating workflow changes
45
+ - Debugging failed executions
46
+ - Performance optimization
47
+ - Pre-deployment validation
48
+
49
+ ### n8n Workflow Components
50
+
51
+ | Component | Purpose | Testing Focus |
52
+ |-----------|---------|---------------|
53
+ | **Trigger** | Starts workflow | Reliable activation, payload handling |
54
+ | **Action Nodes** | Process data | Configuration, data mapping |
55
+ | **Logic Nodes** | Control flow | Conditional routing, branches |
56
+ | **Integration Nodes** | External APIs | Auth, rate limits, errors |
57
+ | **Error Workflow** | Handle failures | Recovery, notifications |
58
+
59
+ ### Workflow Execution States
60
+
61
+ | State | Meaning | Test Action |
62
+ |-------|---------|-------------|
63
+ | `running` | Currently executing | Monitor progress |
64
+ | `success` | Completed successfully | Validate outputs |
65
+ | `failed` | Execution failed | Analyze error |
66
+ | `waiting` | Waiting for trigger | Test trigger mechanism |
67
+
68
+ ---
69
+
70
+ ## Workflow Structure Validation
71
+
72
+ ```typescript
73
+ // Validate workflow structure before execution
74
+ async function validateWorkflowStructure(workflowId: string) {
75
+ const workflow = await getWorkflow(workflowId);
76
+
77
+ // Check for trigger node
78
+ const triggerNode = workflow.nodes.find(n =>
79
+ n.type.includes('trigger') || n.type.includes('webhook')
80
+ );
81
+ if (!triggerNode) {
82
+ throw new Error('Workflow must have a trigger node');
83
+ }
84
+
85
+ // Check for orphan nodes (no connections)
86
+ const connectedNodes = new Set();
87
+ for (const [source, targets] of Object.entries(workflow.connections)) {
88
+ connectedNodes.add(source);
89
+ for (const outputs of Object.values(targets)) {
90
+ for (const connections of outputs) {
91
+ for (const conn of connections) {
92
+ connectedNodes.add(conn.node);
93
+ }
94
+ }
95
+ }
96
+ }
97
+
98
+ const orphans = workflow.nodes.filter(n => !connectedNodes.has(n.name));
99
+ if (orphans.length > 0) {
100
+ console.warn('Orphan nodes detected:', orphans.map(n => n.name));
101
+ }
102
+
103
+ // Validate credentials
104
+ for (const node of workflow.nodes) {
105
+ if (node.credentials) {
106
+ for (const [type, ref] of Object.entries(node.credentials)) {
107
+ if (!await credentialExists(ref.id)) {
108
+ throw new Error(`Missing credential: ${type} for node ${node.name}`);
109
+ }
110
+ }
111
+ }
112
+ }
113
+
114
+ return { valid: true, orphans, triggerNode };
115
+ }
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Execution Testing
121
+
122
+ ```typescript
123
+ // Test workflow execution with various inputs
124
+ async function testWorkflowExecution(workflowId: string, testCases: TestCase[]) {
125
+ const results: TestResult[] = [];
126
+
127
+ for (const testCase of testCases) {
128
+ const startTime = Date.now();
129
+
130
+ // Execute workflow
131
+ const execution = await executeWorkflow(workflowId, testCase.input);
132
+
133
+ // Wait for completion
134
+ const result = await waitForCompletion(execution.id, testCase.timeout || 30000);
135
+
136
+ // Validate output
137
+ const outputValid = validateOutput(result.data, testCase.expected);
138
+
139
+ results.push({
140
+ testCase: testCase.name,
141
+ success: result.status === 'success' && outputValid,
142
+ duration: Date.now() - startTime,
143
+ actualOutput: result.data,
144
+ expectedOutput: testCase.expected
145
+ });
146
+ }
147
+
148
+ return results;
149
+ }
150
+
151
+ // Example test cases
152
+ const testCases = [
153
+ {
154
+ name: 'Valid customer data',
155
+ input: { name: 'John Doe', email: 'john@example.com' },
156
+ expected: { processed: true, customerId: /^cust_/ },
157
+ timeout: 10000
158
+ },
159
+ {
160
+ name: 'Missing email',
161
+ input: { name: 'Jane Doe' },
162
+ expected: { error: 'Email required' },
163
+ timeout: 5000
164
+ },
165
+ {
166
+ name: 'Invalid email format',
167
+ input: { name: 'Bob', email: 'not-an-email' },
168
+ expected: { error: 'Invalid email' },
169
+ timeout: 5000
170
+ }
171
+ ];
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Data Flow Validation
177
+
178
+ ```typescript
179
+ // Trace data through workflow nodes
180
+ async function validateDataFlow(executionId: string) {
181
+ const execution = await getExecution(executionId);
182
+ const nodeResults = execution.data.resultData.runData;
183
+
184
+ const dataFlow: DataFlowStep[] = [];
185
+
186
+ for (const [nodeName, runs] of Object.entries(nodeResults)) {
187
+ for (const run of runs) {
188
+ dataFlow.push({
189
+ node: nodeName,
190
+ input: run.data?.main?.[0]?.[0]?.json || {},
191
+ output: run.data?.main?.[0]?.[0]?.json || {},
192
+ executionTime: run.executionTime,
193
+ status: run.executionStatus
194
+ });
195
+ }
196
+ }
197
+
198
+ // Validate data transformations
199
+ for (let i = 1; i < dataFlow.length; i++) {
200
+ const prev = dataFlow[i - 1];
201
+ const curr = dataFlow[i];
202
+
203
+ // Check if expected data passed through
204
+ validateDataMapping(prev.output, curr.input);
205
+ }
206
+
207
+ return dataFlow;
208
+ }
209
+
210
+ // Validate data mapping between nodes
211
+ function validateDataMapping(sourceOutput: any, targetInput: any) {
212
+ // Check all required fields are present
213
+ const missingFields: string[] = [];
214
+
215
+ for (const [key, value] of Object.entries(targetInput)) {
216
+ if (value === undefined && sourceOutput[key] === undefined) {
217
+ missingFields.push(key);
218
+ }
219
+ }
220
+
221
+ if (missingFields.length > 0) {
222
+ console.warn('Missing fields in data mapping:', missingFields);
223
+ }
224
+
225
+ return missingFields.length === 0;
226
+ }
227
+ ```
228
+
229
+ ---
230
+
231
+ ## Error Handling Testing
232
+
233
+ ```typescript
234
+ // Test error handling paths
235
+ async function testErrorHandling(workflowId: string) {
236
+ const errorScenarios = [
237
+ {
238
+ name: 'API timeout',
239
+ inject: { delay: 35000 }, // Trigger timeout
240
+ expectedError: 'timeout'
241
+ },
242
+ {
243
+ name: 'Invalid data',
244
+ inject: { invalidField: true },
245
+ expectedError: 'validation'
246
+ },
247
+ {
248
+ name: 'Missing credentials',
249
+ inject: { removeCredentials: true },
250
+ expectedError: 'authentication'
251
+ }
252
+ ];
253
+
254
+ const results: ErrorTestResult[] = [];
255
+
256
+ for (const scenario of errorScenarios) {
257
+ // Execute with error injection
258
+ const execution = await executeWithErrorInjection(workflowId, scenario.inject);
259
+
260
+ // Check error was caught
261
+ const result = await waitForCompletion(execution.id);
262
+
263
+ // Validate error handling
264
+ results.push({
265
+ scenario: scenario.name,
266
+ errorCaught: result.status === 'failed',
267
+ errorType: result.data?.resultData?.error?.type,
268
+ expectedError: scenario.expectedError,
269
+ errorWorkflowTriggered: await checkErrorWorkflowTriggered(execution.id),
270
+ alertSent: await checkAlertSent(execution.id)
271
+ });
272
+ }
273
+
274
+ return results;
275
+ }
276
+
277
+ // Verify error workflow was triggered
278
+ async function checkErrorWorkflowTriggered(executionId: string): Promise<boolean> {
279
+ const errorExecutions = await getExecutions({
280
+ filter: {
281
+ metadata: { errorTriggeredBy: executionId }
282
+ }
283
+ });
284
+
285
+ return errorExecutions.length > 0;
286
+ }
287
+ ```
288
+
289
+ ---
290
+
291
+ ## Node Connection Patterns
292
+
293
+ ### Linear Flow
294
+ ```
295
+ Trigger → Process → Transform → Output
296
+ ```
297
+ **Testing:** Execute once, validate each node output
298
+
299
+ ### Branching Flow
300
+ ```
301
+ Trigger → IF → [Branch A] → Merge → Output
302
+ → [Branch B] →
303
+ ```
304
+ **Testing:** Test both branches separately, verify merge behavior
305
+
306
+ ### Parallel Flow
307
+ ```
308
+ Trigger → Split → [Process A] → Merge → Output
309
+ → [Process B] →
310
+ ```
311
+ **Testing:** Validate parallel execution, check merge timing
312
+
313
+ ### Loop Flow
314
+ ```
315
+ Trigger → SplitInBatches → Process → [Loop back until done] → Output
316
+ ```
317
+ **Testing:** Test with varying batch sizes, verify all items processed
318
+
319
+ ---
320
+
321
+ ## Common Testing Patterns
322
+
323
+ ### Test Data Generation
324
+
325
+ ```typescript
326
+ // Generate test data for common n8n patterns
327
+ const testDataGenerators = {
328
+ webhook: () => ({
329
+ body: { event: 'test', timestamp: new Date().toISOString() },
330
+ headers: { 'Content-Type': 'application/json' },
331
+ query: { source: 'test' }
332
+ }),
333
+
334
+ slack: () => ({
335
+ type: 'message',
336
+ channel: 'C123456',
337
+ user: 'U789012',
338
+ text: 'Test message'
339
+ }),
340
+
341
+ github: () => ({
342
+ action: 'opened',
343
+ issue: {
344
+ number: 1,
345
+ title: 'Test Issue',
346
+ body: 'Test body'
347
+ },
348
+ repository: {
349
+ full_name: 'test/repo'
350
+ }
351
+ }),
352
+
353
+ stripe: () => ({
354
+ type: 'payment_intent.succeeded',
355
+ data: {
356
+ object: {
357
+ id: 'pi_test123',
358
+ amount: 1000,
359
+ currency: 'usd'
360
+ }
361
+ }
362
+ })
363
+ };
364
+ ```
365
+
366
+ ### Execution Assertions
367
+
368
+ ```typescript
369
+ // Common assertions for workflow execution
370
+ const workflowAssertions = {
371
+ // Assert workflow completed
372
+ assertCompleted: (execution) => {
373
+ expect(execution.finished).toBe(true);
374
+ expect(execution.status).toBe('success');
375
+ },
376
+
377
+ // Assert specific node executed
378
+ assertNodeExecuted: (execution, nodeName) => {
379
+ const nodeData = execution.data.resultData.runData[nodeName];
380
+ expect(nodeData).toBeDefined();
381
+ expect(nodeData[0].executionStatus).toBe('success');
382
+ },
383
+
384
+ // Assert data transformation
385
+ assertDataTransformed: (execution, nodeName, expectedData) => {
386
+ const nodeOutput = execution.data.resultData.runData[nodeName][0].data.main[0][0].json;
387
+ expect(nodeOutput).toMatchObject(expectedData);
388
+ },
389
+
390
+ // Assert execution time
391
+ assertExecutionTime: (execution, maxMs) => {
392
+ const duration = new Date(execution.stoppedAt) - new Date(execution.startedAt);
393
+ expect(duration).toBeLessThan(maxMs);
394
+ }
395
+ };
396
+ ```
397
+
398
+ ---
399
+
400
+ ## Agent Coordination Hints
401
+
402
+ ### Memory Namespace
403
+ ```
404
+ aqe/n8n/
405
+ ├── workflows/* - Cached workflow definitions
406
+ ├── test-results/* - Test execution results
407
+ ├── validations/* - Validation reports
408
+ ├── patterns/* - Discovered testing patterns
409
+ └── executions/* - Execution tracking
410
+ ```
411
+
412
+ ### Fleet Coordination
413
+ ```typescript
414
+ // Comprehensive n8n testing with fleet
415
+ const n8nFleet = await FleetManager.coordinate({
416
+ strategy: 'n8n-testing',
417
+ agents: [
418
+ 'n8n-workflow-executor', // Execute and validate
419
+ 'n8n-node-validator', // Validate configurations
420
+ 'n8n-trigger-test', // Test triggers
421
+ 'n8n-expression-validator', // Validate expressions
422
+ 'n8n-integration-test' // Test integrations
423
+ ],
424
+ topology: 'parallel'
425
+ });
426
+ ```
427
+
428
+ ---
429
+
430
+ ## Related Skills
431
+ - [n8n-expression-testing](../n8n-expression-testing/) - Expression validation
432
+ - [n8n-trigger-testing-strategies](../n8n-trigger-testing-strategies/) - Trigger testing
433
+ - [n8n-integration-testing-patterns](../n8n-integration-testing-patterns/) - Integration testing
434
+ - [n8n-security-testing](../n8n-security-testing/) - Security validation
435
+
436
+ ---
437
+
438
+ ## Remember
439
+
440
+ **n8n workflows are JSON-based execution flows** that connect 400+ services. Testing requires validating:
441
+ - Workflow structure (nodes, connections)
442
+ - Trigger reliability (webhooks, schedules)
443
+ - Data flow (transformations between nodes)
444
+ - Error handling (retry, fallback, notifications)
445
+ - Performance (execution time, resource usage)
446
+
447
+ **With Agents:** Use n8n-workflow-executor for execution testing, n8n-node-validator for configuration validation, and coordinate multiple agents for comprehensive workflow testing.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.5.7] - 2025-12-17
11
+
12
+ ### Added
13
+
14
+ #### n8n Workflow Testing Agents (PR #151)
15
+ *Contributed by [@fndlalit](https://github.com/fndlalit)*
16
+
17
+ Comprehensive suite of **15 n8n workflow testing agents** for production-ready workflow automation testing:
18
+
19
+ - **N8nWorkflowExecutorAgent** - Execute workflows with data flow validation and assertions
20
+ - **N8nPerformanceTesterAgent** - Load/stress testing with timing metrics and percentiles
21
+ - **N8nChaosTesterAgent** - Fault injection using N8nTestHarness for real failure simulation
22
+ - **N8nBDDScenarioTesterAgent** - Cucumber-style BDD testing with real execution
23
+ - **N8nSecurityAuditorAgent** - 40+ secret patterns, runtime leak detection
24
+ - **N8nExpressionValidatorAgent** - Safe expression validation using pattern matching
25
+ - **N8nIntegrationTestAgent** - Real API connectivity testing via workflow execution
26
+ - **N8nTriggerTestAgent** - Webhook testing with correct n8n URL patterns
27
+ - **N8nComplianceValidatorAgent** - GDPR/HIPAA/SOC2/PCI-DSS compliance with runtime PII tracing
28
+ - **N8nMonitoringValidatorAgent** - SLA compliance checking with runtime metrics
29
+ - Plus 5 additional n8n agents (node-validator, unit-tester, version-comparator, ci-orchestrator, base-agent)
30
+
31
+ **5 new n8n testing skills:**
32
+ - `n8n-workflow-testing-fundamentals` - Core workflow testing concepts
33
+ - `n8n-security-testing` - Credential and secret management testing
34
+ - `n8n-integration-testing-patterns` - API and webhook testing strategies
35
+ - `n8n-expression-testing` - Safe expression validation
36
+ - `n8n-trigger-testing-strategies` - Trigger testing patterns
37
+
38
+ **Key Design Decisions:**
39
+ - Runtime execution is DEFAULT (not opt-in)
40
+ - Safe expression evaluation using pattern matching (no unsafe eval)
41
+ - Correct n8n webhook URL patterns (production + test mode)
42
+ - Dual authentication support (API key + session cookie fallback)
43
+
44
+ ### Changed
45
+
46
+ - Updated skill count from 41 to 46 (added 5 n8n skills)
47
+ - Updated agent documentation with n8n workflow testing section
48
+ - Updated `aqe init` to copy n8n agent definitions to user projects
49
+ - Added Smithery badge to README (PR #152 by @gurdasnijor)
50
+
10
51
  ## [2.5.6] - 2025-12-16
11
52
 
12
53
  ### Changed
package/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Agentic Quality Engineering Fleet
2
2
 
3
+
3
4
  <div align="center">
4
5
 
5
6
  [![npm version](https://img.shields.io/npm/v/agentic-qe.svg)](https://www.npmjs.com/package/agentic-qe)
@@ -7,13 +8,14 @@
7
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
8
9
  [![Node.js](https://img.shields.io/badge/Node.js-20+-green.svg)](https://nodejs.org/)
9
10
  <img alt="NPM Downloads" src="https://img.shields.io/npm/dw/agentic-qe">
11
+ [![Run in Smithery](https://smithery.ai/badge/skills/proffesor-for-testing)](https://smithery.ai/skills?ns=proffesor-for-testing&utm_source=github&utm_medium=badge)
10
12
 
11
13
 
12
- **Version 2.5.6** | [Changelog](CHANGELOG.md) | [Contributors](CONTRIBUTORS.md) | [Issues](https://github.com/proffesor-for-testing/agentic-qe/issues) | [Discussions](https://github.com/proffesor-for-testing/agentic-qe/discussions)
14
+ **Version 2.5.7** | [Changelog](CHANGELOG.md) | [Contributors](CONTRIBUTORS.md) | [Issues](https://github.com/proffesor-for-testing/agentic-qe/issues) | [Discussions](https://github.com/proffesor-for-testing/agentic-qe/discussions)
13
15
 
14
16
  > AI-powered test automation that learns from every task, switches between 300+ AI models on-the-fly, scores code testability, visualizes agent activity in real-time, and improves autonomously overnight — with built-in safety guardrails and full observability.
15
17
 
16
- 🎨 **Real-Time Visualization** | 📊 **Testability Scoring** | 🧠 **QE Agent Learning** | 🚀 **QUIC Transport** | 📋 **Constitution System** | 📚 **41 QE Skills** | 🎯 **Flaky Detection** | 💰 **Multi-Model Router**
18
+ 🎨 **Real-Time Visualization** | 📊 **Testability Scoring** | 🧠 **QE Agent Learning** | 🚀 **QUIC Transport** | 📋 **Constitution System** | 📚 **46 QE Skills** | 🎯 **Flaky Detection** | 💰 **Multi-Model Router** | 🔄 **n8n Workflow Testing**
17
19
 
18
20
  </div>
19
21
 
@@ -60,9 +62,10 @@ claude "Use qe-flaky-test-hunter to analyze the last 100 test runs and identify
60
62
  - ✅ Learning System (20% improvement target)
61
63
  - ✅ Pattern Bank (cross-project reuse)
62
64
  - ✅ ML Flaky Detection (90%+ accuracy with root cause analysis)
63
- - ✅ 19 Specialized agent definitions (including qe-code-complexity)
65
+ - ✅ 19 Specialized QE agent definitions (including qe-code-complexity)
66
+ - ✅ 15 n8n workflow testing agents (workflow execution, chaos, compliance, security, performance by [@fndlalit](https://github.com/fndlalit))
64
67
  - ✅ 11 TDD subagent definitions (RED/GREEN/REFACTOR phases + specialized)
65
- - ✅ 41 World-class QE skills library (accessibility, shift-left/right, verification, visual testing, XP practices, **testability-scoring** by [@fndlalit](https://github.com/fndlalit))
68
+ - ✅ 46 World-class QE skills library (accessibility, shift-left/right, verification, visual testing, XP practices, n8n testing, **testability-scoring** by [@fndlalit](https://github.com/fndlalit))
66
69
  - ✅ 8 AQE slash commands
67
70
  - ✅ Modular init system with comprehensive project setup
68
71
 
@@ -0,0 +1,121 @@
1
+ /**
2
+ * N8n API Client
3
+ *
4
+ * HTTP client for interacting with n8n REST API
5
+ * Handles authentication, retries, caching, and error handling
6
+ */
7
+ import { N8nAPIConfig, N8nWorkflow, N8nExecution, N8nCredential } from './types';
8
+ export declare class N8nAPIClient {
9
+ private readonly config;
10
+ private readonly cache;
11
+ private readonly cacheTTL;
12
+ private sessionCookie;
13
+ private sessionInitialized;
14
+ constructor(config: N8nAPIConfig);
15
+ /**
16
+ * Initialize session-based authentication
17
+ * Called automatically on first request if sessionAuth is configured
18
+ */
19
+ initSession(): Promise<boolean>;
20
+ /**
21
+ * List all workflows
22
+ */
23
+ listWorkflows(): Promise<N8nWorkflow[]>;
24
+ /**
25
+ * Get workflow by ID
26
+ */
27
+ getWorkflow(workflowId: string, useCache?: boolean): Promise<N8nWorkflow>;
28
+ /**
29
+ * Execute a workflow
30
+ */
31
+ executeWorkflow(workflowId: string, data?: Record<string, unknown>): Promise<N8nExecution>;
32
+ /**
33
+ * Activate a workflow
34
+ */
35
+ activateWorkflow(workflowId: string): Promise<N8nWorkflow>;
36
+ /**
37
+ * Deactivate a workflow
38
+ */
39
+ deactivateWorkflow(workflowId: string): Promise<N8nWorkflow>;
40
+ /**
41
+ * Create a new workflow
42
+ * Accepts workflow without id, createdAt, updatedAt (server will generate these)
43
+ */
44
+ createWorkflow(workflow: Omit<N8nWorkflow, 'id' | 'createdAt' | 'updatedAt'>): Promise<N8nWorkflow>;
45
+ /**
46
+ * Update an existing workflow
47
+ */
48
+ updateWorkflow(workflowId: string, workflow: Partial<N8nWorkflow>): Promise<N8nWorkflow>;
49
+ /**
50
+ * Delete a workflow
51
+ */
52
+ deleteWorkflow(workflowId: string): Promise<void>;
53
+ /**
54
+ * List executions
55
+ */
56
+ listExecutions(filters?: {
57
+ workflowId?: string;
58
+ status?: string;
59
+ limit?: number;
60
+ }): Promise<N8nExecution[]>;
61
+ /**
62
+ * Get execution by ID
63
+ */
64
+ getExecution(executionId: string): Promise<N8nExecution>;
65
+ /**
66
+ * Delete execution
67
+ */
68
+ deleteExecution(executionId: string): Promise<void>;
69
+ /**
70
+ * Wait for execution to complete
71
+ */
72
+ waitForExecution(executionId: string, timeout?: number, pollInterval?: number): Promise<N8nExecution>;
73
+ /**
74
+ * List credentials (metadata only, no secrets)
75
+ */
76
+ listCredentials(): Promise<N8nCredential[]>;
77
+ /**
78
+ * Get credential by ID (metadata only)
79
+ */
80
+ getCredential(credentialId: string): Promise<N8nCredential>;
81
+ /**
82
+ * Check n8n API health
83
+ */
84
+ healthCheck(): Promise<{
85
+ status: string;
86
+ }>;
87
+ /**
88
+ * Test API connectivity
89
+ */
90
+ testConnection(): Promise<boolean>;
91
+ /**
92
+ * Make HTTP request with retry logic
93
+ * Supports both API key auth (Public API) and session cookie auth (Internal REST API)
94
+ */
95
+ private request;
96
+ /**
97
+ * Get item from cache
98
+ */
99
+ private getFromCache;
100
+ /**
101
+ * Set item in cache
102
+ */
103
+ private setCache;
104
+ /**
105
+ * Clear cache
106
+ */
107
+ clearCache(): void;
108
+ /**
109
+ * Sleep utility
110
+ */
111
+ private sleep;
112
+ }
113
+ /**
114
+ * Custom error class for N8n API errors
115
+ */
116
+ export declare class N8nAPIError extends Error {
117
+ readonly statusCode: number;
118
+ readonly path: string;
119
+ constructor(message: string, statusCode: number, path: string);
120
+ }
121
+ //# sourceMappingURL=N8nAPIClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"N8nAPIClient.d.ts","sourceRoot":"","sources":["../../../src/agents/n8n/N8nAPIClient.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8F;IACrH,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgE;IACtF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,kBAAkB,CAAS;gBAEvB,MAAM,EAAE,YAAY;IAWhC;;;OAGG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IA6CrC;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAK7C;;OAEG;IACG,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,UAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAa5E;;OAEG;IACG,eAAe,CACnB,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,YAAY,CAAC;IAUxB;;OAEG;IACG,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAOhE;;OAEG;IACG,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAOlE;;;OAGG;IACG,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAUzG;;OAEG;IACG,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAa9F;;OAEG;IACG,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAcvD;;OAEG;IACG,cAAc,CAAC,OAAO,CAAC,EAAE;QAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAa3B;;OAEG;IACG,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAI9D;;OAEG;IACG,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD;;OAEG;IACG,gBAAgB,CACpB,WAAW,EAAE,MAAM,EACnB,OAAO,SAAQ,EACf,YAAY,SAAO,GAClB,OAAO,CAAC,YAAY,CAAC;IAoBxB;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAKjD;;OAEG;IACG,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAQjE;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAUhD;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAaxC;;;OAGG;YACW,OAAO;IA+GrB;;OAEG;IACH,OAAO,CAAC,YAAY;IAYpB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAIhB;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,OAAO,CAAC,KAAK;CAGd;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;aAGlB,UAAU,EAAE,MAAM;aAClB,IAAI,EAAE,MAAM;gBAF5B,OAAO,EAAE,MAAM,EACC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM;CAK/B"}