/middleware-testing-patterns
Enterprise middleware testing patterns for message routing, transformation, DLQ, protocol mediation, ESB error handling, and EIP patterns. Use when testing middleware layers, message brokers, ESBs, or integration buses.
$ npx -y skills add proffesor-for-testing/agentic-qe --skill middleware-testing-patterns --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
/middleware-testing-patterns
Context preview
The summary Claude sees to decide when to auto-load this skill.
Enterprise middleware testing patterns for message routing, transformation, DLQ, protocol mediation, ESB error handling, and EIP patterns. Use when testing middleware layers, message brokers, ESBs, or integration buses.
SKILL.md
middleware-testing-patterns.SKILL.mdname: middleware-testing-patterns
description: "Enterprise middleware testing patterns for message routing, transformation, DLQ, protocol mediation, ESB error handling, and EIP patterns. Use when testing middleware layers, message brokers, ESBs, or integration buses."
category: enterprise-integration
priority: high
tokenEstimate: 1800
agents: [qe-middleware-validator, qe-message-broker-tester, qe-soap-tester]
implementation_status: optimized
optimization_version: 1.0
last_optimized: 2026-02-04
dependencies: [api-testing-patterns, contract-testing]
quick_reference_card: true
tags: [middleware, esb, soap, messaging, iib, mq, transformation, routing]
trust_tier: 3
validation:
schema_path: schemas/output.json
validator_path: scripts/validate-config.json
eval_path: evals/middleware-testing-patterns.yaml
Middleware Testing Patterns
<default_to_action> When testing enterprise middleware, ESBs, or message-driven systems: 1. VALIDATE message routing logic (content-based, header-based, recipient list) 2. TEST message transformations end-to-end (input format -> output format) 3. VERIFY dead letter queue handling (poison messages, retry exhaustion) 4. ASSERT message ordering and sequencing with correlation IDs 5. EXERCISE error handling and compensation patterns 6. TEST protocol mediation (SOAP-to-REST, sync-to-async) 7. VALIDATE EIP patterns (splitter, aggregator, content enricher, normalizer)
**Quick Pattern Selection:**
- Message routing issues -> Content-based router tests
- Transformation failures -> Schema-in/schema-out validation
- Lost messages -> DLQ and retry pattern tests
- Protocol bridging -> Mediation round-trip tests
- Complex flows -> Correlation ID tracing tests
**Critical Success Factors:**
- Middleware is invisible when it works; test the invisible
- Always validate both the happy path AND the error channel (DLQ)
- Correlation IDs are your lifeline for tracing multi-hop messages
</default_to_action>
Quick Reference Card
When to Use
- Testing ESB message flows (IBM IIB/ACE, MuleSoft, WSO2)
- Validating message transformations (XSLT, JSON-to-XML, flat-file parsing)
- Testing message broker routing (MQ, Kafka, RabbitMQ)
- Verifying dead letter queue behavior
- Testing protocol mediation (SOAP/REST bridging)
- Validating Enterprise Integration Patterns (EIP)
Testing Levels
| Level | Purpose | Dependencies | Speed | |-------|---------|--------------|-------| | Unit Transform | Single mapping correctness | None | Fast | | Route Logic | Routing decision accuracy | Mocked endpoints | Fast | | Integration | End-to-end message flow | Broker + endpoints | Medium | | DLQ/Error | Error handling and recovery | Full middleware stack | Slower |
Critical Test Scenarios
| Scenario | Must Test | Example | |----------|----------|---------| | Routing | Correct destination selection | Order type A -> Queue A, type B -> Queue B | | Transformation | Schema compliance after mapping | XML -> JSON field mapping accuracy | | DLQ | Poison message handling | Malformed XML lands in DLQ, not lost | | Ordering | Sequence preservation | Messages 1-2-3 arrive in order | | Correlation | Multi-hop tracing | Request-reply matched by correlation ID | | Retry | Transient failure recovery | 3 retries with backoff, then DLQ | | Mediation | Protocol bridging fidelity | SOAP request produces correct REST call |
Tools
- **Message Brokers**: IBM MQ, RabbitMQ, Apache Kafka, ActiveMQ
- **ESBs**: IBM IIB/ACE, MuleSoft, WSO2, Apache Camel
- **Testing**: SoapUI, Postman, custom harnesses
- **Virtualization**: Mountebank, WireMock, HoverFly
- **Monitoring**: Splunk, ELK, Datadog
Agent Coordination
- `qe-middleware-validator`: Validate routing rules, transformation accuracy, EIP patterns
- `qe-message-broker-tester`: Test broker connectivity, DLQ behavior, message ordering
- `qe-soap-tester`: SOAP/WSDL validation, WS-Security, protocol mediation
---
Message Routing Pattern Testing
Content-Based Router
describe('Content-Based Router - Order Type', () => {
it('routes standard orders to fulfillment queue', async () => {
const message = {
correlationId: uuid(),
body: { orderType: 'STANDARD', orderId: 'ORD-001', items: [{ sku: 'A1', qty: 2 }] }
};
await broker.publish('orders.inbound', message);
const routed = await broker.consume('orders.fulfillment', { timeout: 5000 });
expect(routed.body.orderId).toBe('ORD-001');
expect(routed.correlationId).toBe(message.correlationId);
const dlq = await broker.tryConsume('orders.dlq', { timeout: 1000 });
expect(dlq).toBeNull(); // Nothing in DLQ
});
it('routes express orders to priority queue', async () => {
const message = {
correlationId: uuid(),
body: { orderType: 'EXPRESS', orderId: 'ORD-002', items: [{ sku: 'B1', qty: 1 }] }
};
await broker.publish('orders.inbound', message);
const routed = await broker.consume('orders.priority', { timeout: 5000 });
expect(routed.body.orderId).toBe('ORD-002');
});
it('sends unrecognized order types to DLQ', async () => {
const message = {
correlationId: uuid(),
body: { orderType: 'UNKNOWN', orderId: 'ORD-003' }
};
await broker.publish('orders.inbound', message);
const dlqMessage = await broker.consume('orders.dlq', { timeout: 5000 });
expect(dlqMessage.body.orderId).toBe('ORD-003');
expect(dlqMessage.headers['x-error-reason']).toContain('Unrecognized orderType');
});
});Header-Based Router
describe('Header-Based Router - Region', () => {
it('routes by x-region header to regional queues', async () => {
const regions = ['US', 'EU', 'APAC'];
for (const region of regions) {
const message = {
headers: { 'x-region': region },
body: { orderId: `ORD-${region}` }
};
await broker.publish('orders.global', message);
const routed = await broker.consume(`orders.${region.toLowerCase()}`, { timeout:Read more
name: middleware-testing-patterns description: "Enterprise middleware testing patterns for message routing, transformation, DLQ, protocol mediation, ESB error handling, and EIP patterns. Use when testing middleware layers, message brokers, ESBs, or integration buses." category: enterprise-integration priority: high tokenEstimate: 1800 agents: [qe-middleware-validator, qe-message-broker-tester, qe-soap-tester] implementation_status: optimized optimization_version: 1.0 last_optimized: 2026-02-04 dependencies: [api-testing-patterns, contract-testing] quick_reference_card: true tags: [middleware, esb, soap, messaging, iib, mq, transformation, routing] trust_tier: 3 validation: schema_path: schemas/output.json validator_path: scripts/validate-config.json eval_path: evals/middleware-testing-patterns.yaml
Middleware Testing Patterns
<default_to_action> When testing enterprise middleware, ESBs, or message-driven systems: 1. VALIDATE message routing logic (content-based, header-based, recipient list) 2. TEST message transformations end-to-end (input format -> output format) 3. VERIFY dead letter queue handling (poison messages, retry exhaustion) 4. ASSERT message ordering and sequencing with correlation IDs 5. EXERCISE error handling and compensation patterns 6. TEST protocol mediation (SOAP-to-REST, sync-to-async) 7. VALIDATE EIP patterns (splitter, aggregator, content enricher, normalizer)
**Quick Pattern Selection:**
- Message routing issues -> Content-based router tests
- Transformation failures -> Schema-in/schema-out validation
- Lost messages -> DLQ and retry pattern tests
- Protocol bridging -> Mediation round-trip tests
- Complex flows -> Correlation ID tracing tests
**Critical Success Factors:**
- Middleware is invisible when it works; test the invisible
- Always validate both the happy path AND the error channel (DLQ)
- Correlation IDs are your lifeline for tracing multi-hop messages
</default_to_action>
Quick Reference Card
When to Use
- Testing ESB message flows (IBM IIB/ACE, MuleSoft, WSO2)
- Validating message transformations (XSLT, JSON-to-XML, flat-file parsing)
- Testing message broker routing (MQ, Kafka, RabbitMQ)
- Verifying dead letter queue behavior
- Testing protocol mediation (SOAP/REST bridging)
- Validating Enterprise Integration Patterns (EIP)
Testing Levels
| Level | Purpose | Dependencies | Speed | |-------|---------|--------------|-------| | Unit Transform | Single mapping correctness | None | Fast | | Route Logic | Routing decision accuracy | Mocked endpoints | Fast | | Integration | End-to-end message flow | Broker + endpoints | Medium | | DLQ/Error | Error handling and recovery | Full middleware stack | Slower |
Critical Test Scenarios
| Scenario | Must Test | Example | |----------|----------|---------| | Routing | Correct destination selection | Order type A -> Queue A, type B -> Queue B | | Transformation | Schema compliance after mapping | XML -> JSON field mapping accuracy | | DLQ | Poison message handling | Malformed XML lands in DLQ, not lost | | Ordering | Sequence preservation | Messages 1-2-3 arrive in order | | Correlation | Multi-hop tracing | Request-reply matched by correlation ID | | Retry | Transient failure recovery | 3 retries with backoff, then DLQ | | Mediation | Protocol bridging fidelity | SOAP request produces correct REST call |
Tools
- **Message Brokers**: IBM MQ, RabbitMQ, Apache Kafka, ActiveMQ
- **ESBs**: IBM IIB/ACE, MuleSoft, WSO2, Apache Camel
- **Testing**: SoapUI, Postman, custom harnesses
- **Virtualization**: Mountebank, WireMock, HoverFly
- **Monitoring**: Splunk, ELK, Datadog
Agent Coordination
- `qe-middleware-validator`: Validate routing rules, transformation accuracy, EIP patterns
- `qe-message-broker-tester`: Test broker connectivity, DLQ behavior, message ordering
- `qe-soap-tester`: SOAP/WSDL validation, WS-Security, protocol mediation
---
Message Routing Pattern Testing
Content-Based Router
describe('Content-Based Router - Order Type', () => {
it('routes standard orders to fulfillment queue', async () => {
const message = {
correlationId: uuid(),
body: { orderType: 'STANDARD', orderId: 'ORD-001', items: [{ sku: 'A1', qty: 2 }] }
};
await broker.publish('orders.inbound', message);
const routed = await broker.consume('orders.fulfillment', { timeout: 5000 });
expect(routed.body.orderId).toBe('ORD-001');
expect(routed.correlationId).toBe(message.correlationId);
const dlq = await broker.tryConsume('orders.dlq', { timeout: 1000 });
expect(dlq).toBeNull(); // Nothing in DLQ
});
it('routes express orders to priority queue', async () => {
const message = {
correlationId: uuid(),
body: { orderType: 'EXPRESS', orderId: 'ORD-002', items: [{ sku: 'B1', qty: 1 }] }
};
await broker.publish('orders.inbound', message);
const routed = await broker.consume('orders.priority', { timeout: 5000 });
expect(routed.body.orderId).toBe('ORD-002');
});
it('sends unrecognized order types to DLQ', async () => {
const message = {
correlationId: uuid(),
body: { orderType: 'UNKNOWN', orderId: 'ORD-003' }
};
await broker.publish('orders.inbound', message);
const dlqMessage = await broker.consume('orders.dlq', { timeout: 5000 });
expect(dlqMessage.body.orderId).toBe('ORD-003');
expect(dlqMessage.headers['x-error-reason']).toContain('Unrecognized orderType');
});
});Header-Based Router
describe('Header-Based Router - Region', () => {
it('routes by x-region header to regional queues', async () => {
const regions = ['US', 'EU', 'APAC'];
for (const region of regions) {
const message = {
headers: { 'x-region': region },
body: { orderId: `ORD-${region}` }
};
await broker.publish('orders.global', message);
const routed = await broker.consume(`orders.${region.toLowerCase()}`, { timeout:AI-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

