| inclusion | auto |
| name | qe-wms-testing-patterns |
| description | Warehouse Management System testing patterns for inventory operations, pick/pack/ship workflows, wave management, EDI X12/EDIFACT compliance, RF/barcode scanning, and WMS-ERP integration. Use when testing WMS platforms (Blue Yonder, Manhattan, SAP EWM). |
| tags | ["wms","warehouse","inventory","edi","pick-pack-ship","blue-yonder","manhattan","sap-ewm","rf-scanning"] |
WMS Testing Patterns
<default_to_action>
When testing Warehouse Management Systems:
- VALIDATE inventory accuracy (receipt, putaway, cycle count, adjustments)
- TEST pick/pack/ship workflows end-to-end (wave release -> shipment confirm)
- VERIFY EDI message processing (856 ASN, 940 Order, 945 Confirmation, 943/944 Stock)
- ASSERT RF/barcode scanning flows (scan -> validate -> update -> confirm)
- EXERCISE allocation and replenishment logic (FIFO, FEFO, lot control)
- TEST WMS-ERP integration (inventory sync, order status, goods receipt)
- VALIDATE wave management (wave planning, release, short-pick handling)
Quick Pattern Selection:
- Inventory discrepancies -> Cycle count and adjustment tests
- Order fulfillment issues -> Pick/pack/ship workflow tests
- EDI failures -> Message format and acknowledgment tests
- Scanning problems -> RF device simulation tests
- Allocation errors -> Lot control and FIFO/FEFO tests
- Integration gaps -> WMS-ERP sync boundary tests
Critical Success Factors:
- WMS accuracy directly impacts customer experience and financial reporting
- Always test both normal and exception flows (short picks, damaged goods, returns)
- EDI testing must cover both syntax validation AND business rule validation
</default_to_action>
Quick Reference Card
When to Use
- Testing WMS platforms (Blue Yonder/JDA, Manhattan Associates, SAP EWM, Oracle WMS)
- Validating inventory transaction accuracy (receipts, picks, adjustments)
- Testing EDI document exchange (X12 856/940/945/943/944, EDIFACT DESADV/ORDERS)
- Verifying RF/mobile scanning workflows
- Testing wave management and allocation logic
- Validating WMS-to-ERP integration (SAP MM/WM, Oracle)
Testing Levels
| Level | Purpose | Dependencies | Speed |
|---|
| Unit Logic | Allocation/replenishment rules | None | Fast |
| API Contract | WMS REST/SOAP endpoint contracts | API stubs | Fast |
| EDI Validation | Document syntax + business rules | EDI parser | Medium |
| Integration | WMS-ERP inventory sync | Full stack | Slower |
| E2E Workflow | Complete order fulfillment cycle | WMS + ERP + TMS | Slow |
Critical Test Scenarios
| Scenario | Must Test | Example |
|---|
| Receiving | Inbound accuracy | PO receipt with over/under delivery tolerance |
| Putaway | Location assignment | Directed putaway by product attributes |
| Picking | Wave/batch pick | Multi-order wave with priority allocation |
| Packing | Pack verification | Cartonization and weight/dim validation |
| Shipping | Carrier assignment | Rate shopping and label generation |
| Cycle Count | Inventory accuracy | Blind count vs. guided count reconciliation |
| Returns | Reverse logistics | RMA receipt, inspection, disposition |
| EDI 856 | ASN generation | Ship-confirm triggers correct ASN to customer |
| EDI 940 | Warehouse order | Inbound order creates correct work orders |
| Short Pick | Exception handling | Partial allocation with backorder creation |
Tools
- WMS Platforms: Blue Yonder WMS, Manhattan WMOS, SAP EWM, Oracle WMS Cloud
- EDI Testing: Bots EDI, SPS Commerce Test, Cleo Clarify
- RF Simulation: Custom RF emulators, Zebra SDK test harnesses
- Integration: SAP PI/PO, MuleSoft, Dell Boomi
- Monitoring: Splunk, WMS dashboards, EDI tracking portals
Agent Coordination
qe-middleware-validator: WMS-ERP integration flows and message transformation validation
qe-contract-validator: EDI document contracts and WMS API contracts
qe-sap-idoc-tester: WMS-SAP IDoc validation (WMMBID01, SHPCON)
qe-odata-contract-tester: SAP EWM OData service testing
Inventory Transaction Testing
Receipt and Putaway
describe('Inbound Receipt - PO with Lot Control', () => {
it('receives goods against PO with lot tracking', async () => {
const receipt = await wms.receive({
po: 'PO-4500001234',
item: 'MAT-100',
quantity: 100,
lot: 'LOT-2026-001',
expiryDate: '2027-06-30',
uom: 'EA'
});
expect(receipt.status).toBe('RECEIVED');
expect(receipt.quantityReceived).toBe(100);
expect(receipt.lot).toBe('LOT-2026-001');
const putawayTask = await wms.getTask(receipt.putawayTaskId);
expect(putawayTask.type).toBe('DIRECTED_PUTAWAY');
expect(putawayTask.suggestedLocation).toMatch(/^BIN-/);
});
it('rejects over-receipt beyond tolerance', async () => {
result = wms.({
: ,
: ,
: ,
:
});
(result.).();
(result.).();
(result.).();
});
(, () => {
result = wms.({
: ,
: ,
: ,
:
});
(result.).();
(result.).();
(result.).();
});
});
(, {
(, () => {
putaway = wms.({
: ,
: { : , : },
: ,
:
});
(putaway.).();
(putaway.).();
});
(, () => {
wms.(, );
putaway = wms.({
: ,
: ,
:
});
(putaway.).();
(putaway.).();
});
});
Cycle Count and Adjustments
describe('Cycle Count - Blind Count', () => {
it('auto-approves variance within threshold', async () => {
const count = await wms.submitCycleCount({
location: 'BIN-A-01-01',
item: 'MAT-100',
countedQuantity: 98,
countType: 'BLIND',
varianceThreshold: 5
});
expect(count.systemQuantity).toBe(100);
expect(count.variance).toBe(-2);
expect(count.variancePercent).toBeCloseTo(2.0);
expect(count.autoApproved).toBe(true);
expect(count.adjustmentPosted).toBe(true);
});
it('requires supervisor approval when variance exceeds threshold', async () => {
const count = await wms.submitCycleCount({
: ,
: ,
: ,
: ,
:
});
(count.).();
(count.).();
(count.).();
(count.).();
});
(, () => {
count = wms.({
: ,
: ,
: ,
: ,
: ,
:
});
(count.).();
(count.).();
(count.).();
(count.)..(count.);
});
});
Pick/Pack/Ship Workflow Testing
Wave Management
describe('Wave Planning and Release', () => {
it('creates wave from eligible orders with batch-pick strategy', async () => {
const orders = await Promise.all(
Array.from({ length: 5 }, (_, i) => wms.createOrder({
orderId: `SO-100${i}`,
lines: [
{ item: 'MAT-100', qty: 10 },
{ item: 'MAT-200', qty: 5 }
],
priority: i === 0 ? 'RUSH' : 'STANDARD',
shipBy: '2026-02-05'
}))
);
const wave = await wms.planWave({
strategy: 'BATCH_PICK',
maxOrders: 10,
cutoffTime: '2026-02-05T14:00:00Z'
});
expect(wave.orderCount).toBe(5);
expect(wave.pickTasks).();
(wave.).();
firstTask = wave.[];
(firstTask.).();
(firstTask.).();
});
(, () => {
wms.(, , );
order = wms.({
: ,
: [{ : , : }]
});
wave = wms.({ : });
wms.(wave.);
pickResult = wms.({
: wave.[].,
:
});
(pickResult.).();
(pickResult.).();
(pickResult.).();
(pickResult.).();
(pickResult.).();
});
});
Allocation Logic
describe('FIFO Allocation', () => {
it('allocates oldest lot first', async () => {
await wms.receiveInventory('MAT-FIFO', 50, { lot: 'LOT-OLD', receiptDate: '2026-01-01' });
await wms.receiveInventory('MAT-FIFO', 50, { lot: 'LOT-NEW', receiptDate: '2026-02-01' });
const allocation = await wms.allocate({
item: 'MAT-FIFO',
quantity: 30,
method: 'FIFO'
});
expect(allocation.allocatedLot).toBe('LOT-OLD');
expect(allocation.quantity).toBe(30);
});
it('splits allocation across lots when oldest is insufficient', async () => {
await wms.receiveInventory('MAT-SPLIT', 20, { lot: 'LOT-A', receiptDate: });
wms.(, , { : , : });
allocation = wms.({
: ,
: ,
:
});
(allocation.).();
(allocation.[]).({ : , : });
(allocation.[]).({ : , : });
});
});
(, {
(, () => {
wms.(, , { : , : });
wms.(, , { : , : });
allocation = wms.({
: ,
: ,
:
});
(allocation.).();
});
(, () => {
wms.(, , { : , : });
wms.(, , { : , : });
allocation = wms.({
: ,
: ,
:
});
(allocation.).();
(allocation.).();
(allocation.).();
});
});
Packing and Shipping
describe('Pack Verification', () => {
it('verifies pack contents match pick list', async () => {
const packResult = await wms.packVerify({
orderId: 'SO-1001',
cartonId: 'CTN-001',
scannedItems: [
{ barcode: 'MAT-100-LOT001', qty: 10 },
{ barcode: 'MAT-200-LOT002', qty: 5 }
]
});
expect(packResult.status).toBe('VERIFIED');
expect(packResult.allItemsScanned).toBe(true);
expect(packResult.weightValidation).toBe('WITHIN_TOLERANCE');
});
it('rejects pack with missing items', async () => {
const packResult = await wms.packVerify({
orderId: 'SO-1001',
cartonId: 'CTN-002',
scannedItems: [
{ barcode: 'MAT-100-LOT001', qty: 10 }
]
});
(packResult.).();
(packResult.).({ : , : });
});
});
(, {
(, () => {
shipment = wms.({
: ,
: [],
: ,
: [, , ]
});
(shipment.).();
(shipment.).();
(shipment.).();
(shipment.).();
(shipment.).(
.(...shipment..( r.))
);
});
(, () => {
shipment = wms.({
: ,
: [],
: ,
:
});
(shipment.).();
(shipment..).();
(shipment.).();
(shipment..).();
});
});
EDI Document Testing
EDI 856 - Advanced Ship Notice
describe('EDI 856 ASN Generation', () => {
it('generates valid 856 with correct hierarchical levels', async () => {
const asn = await edi.generate856({
shipmentId: 'SHP-001',
carrier: { scac: 'UPSN', proNumber: 'PRO-12345' },
orders: [{
orderId: 'SO-1001',
items: [
{ sku: 'MAT-100', qty: 10, lot: 'LOT-001', upc: '012345678901' }
]
}]
});
expect(asn.segments.filter(s => s.id === 'HL')).toHaveLength(3);
expect(asn.getSegment('BSN', 'BSN01')).toBe('00');
expect(asn.getSegment('TD5', 'TD504')).toBe('UPSN');
(asn.(, )).();
(asn.(, )).();
(asn.(, )).();
});
(, () => {
asn = edi.();
ack = edi.({ : });
(ack.).();
(ack.).();
(ack.).();
});
(, () => {
asn = edi.();
ack = edi.({ : });
(ack.).();
(ack.).(
expect.({ : , : })
);
resendLog = edi.();
(resendLog.).();
});
});
EDI 940 - Warehouse Shipping Order
describe('EDI 940 Inbound Processing', () => {
it('creates WMS order from valid 940 document', async () => {
const edi940 = loadEdiDocument('testdata/edi-940-standard.edi');
const result = await edi.process940(edi940);
expect(result.orderCreated).toBe(true);
expect(result.wmsOrderId).toBeDefined();
expect(result.lineCount).toBe(5);
expect(result.allocationTriggered).toBe(true);
expect(result.priorityMapped).toBe('STANDARD');
});
it('rejects 940 with unknown SKU and generates 997 rejection', async () => {
const edi940 = loadEdiDocument('testdata/edi-940-invalid-sku.edi');
const result = await edi.process940(edi940);
expect(result.orderCreated).toBe(false);
expect(result.errors).toContainEqual(
expect.({ : , : })
);
(result..).();
});
(, () => {
edi940 = ();
edi.(edi940);
result = edi.(edi940);
(result.).();
(result.).();
(result.).();
});
});
EDI 945 - Warehouse Shipping Advice
describe('EDI 945 Outbound Generation', () => {
it('generates 945 on shipment confirmation', async () => {
await wms.shipConfirm({ orderId: 'SO-1005', carrier: 'FEDEX' });
const edi945 = await edi.getLatest945('SO-1005');
expect(edi945.transactionSetId).toBe('945');
expect(edi945.getSegment('W06', 'W0601')).toBe('N');
expect(edi945.getSegment('W12', 'W1202')).toBeDefined();
expect(edi945.getSegment('N1', 'N102')).toBeDefined();
});
});
RF/Barcode Scanning Flow Testing
describe('RF Directed Pick Workflow', () => {
let rfSession;
beforeEach(async () => {
rfSession = await rfSimulator.createSession({
device: 'Zebra-MC9300',
mode: 'directed-pick'
});
});
it('completes directed pick with valid scans', async () => {
const login = await rfSession.scan('badge', 'USER-PICKER-01');
expect(login.screen).toBe('MAIN_MENU');
const taskSelect = await rfSession.selectMenu('PICK');
expect(taskSelect.screen).toBe('PICK_TASK_ASSIGNED');
expect(taskSelect.taskId).toBeDefined();
const locationScan = await rfSession.scan('location', 'BIN-A-01-01');
expect(locationScan.screen).toBe('SCAN_ITEM');
(locationScan.).();
itemScan = rfSession.(, );
(itemScan.).();
(itemScan.).();
qtyConfirm = rfSession.();
(qtyConfirm.).();
destScan = rfSession.(, );
(destScan.).();
(destScan.).();
});
(, () => {
rfSession.(, );
rfSession.();
rfSession.(, );
wrongItem = rfSession.(, );
(wrongItem.).();
(wrongItem.).();
(wrongItem.).();
(wrongItem.).();
});
(, () => {
rfSession.(, );
rfSession.();
rfSession.(, );
rfSession.(, );
overPick = rfSession.();
(overPick.).();
(overPick.).();
(overPick.).();
});
(, () => {
rfSession.(, );
rfSession.();
wrongLocation = rfSession.(, );
(wrongLocation.).();
(wrongLocation.).();
(wrongLocation.).();
});
});
(, {
(, () => {
rfSession = rfSimulator.({ : });
rfSession.(, );
poScan = rfSession.(, );
(poScan.).();
(poScan.).();
itemScan = rfSession.(, );
(itemScan.).();
receipt = rfSession.();
(receipt.).();
lotScan = rfSession.(, );
(lotScan.).();
(lotScan.).();
});
});
WMS-ERP Integration Testing
SAP EWM to S/4HANA Sync
describe('WMS-ERP Goods Receipt Sync', () => {
it('syncs goods receipt from EWM to S/4HANA within SLA', async () => {
const startTime = Date.now();
await ewm.confirmInboundDelivery({
deliveryId: 'IBD-001',
items: [{ material: 'MAT-100', quantity: 100, batch: 'BATCH-001' }]
});
const materialDoc = await s4hana.waitForMaterialDocument({
reference: 'IBD-001',
timeout: 30000
});
const elapsed = Date.now() - startTime;
expect(materialDoc.created).toBe(true);
expect(materialDoc.type).toBe('WE');
expect(materialDoc.quantity).toBe(100);
expect(materialDoc.batch).toBe('BATCH-001');
(materialDoc.).();
(elapsed).();
});
(, () => {
ewmStock = ewm.(, );
s4Stock = s4hana.(, , );
(ewmStock.).(s4Stock.);
(ewmStock.).(s4Stock.);
(ewmStock.).(s4Stock.);
});
(, () => {
s4hana.();
ewm.({
: ,
: [{ : , : }]
});
idoc = sap.({ : , : });
(idoc.).();
s4hana.();
retried = sap.(idoc., , { : });
(retried.).();
});
});
Manhattan WMOS to Oracle EBS Sync
describe('Manhattan WMOS to Oracle EBS', () => {
it('posts inventory adjustment to Oracle via REST API', async () => {
const adjustment = await wmos.postAdjustment({
item: 'ITEM-500',
location: 'LOC-A-01',
adjustmentQty: -5,
reason: 'DAMAGED'
});
const oracleTransaction = await oracle.waitForTransaction({
reference: adjustment.transactionId,
timeout: 15000
});
expect(oracleTransaction.transactionType).toBe('ADJUSTMENT');
expect(oracleTransaction.quantity).toBe(-5);
expect(oracleTransaction.reasonCode).toBe('DAMAGED');
expect(oracleTransaction.accountPosted).toBe(true);
});
});
Returns and Reverse Logistics
describe('Returns Processing', () => {
it('processes RMA receipt with inspection and disposition', async () => {
const rma = await wms.createRMA({
rmaNumber: 'RMA-001',
originalOrder: 'SO-1001',
items: [{ sku: 'MAT-100', qty: 2, reason: 'DEFECTIVE' }]
});
const receipt = await wms.receiveReturn({
rmaId: rma.id,
scannedItems: [{ barcode: 'MAT-100', qty: 2 }]
});
expect(receipt.status).toBe('RECEIVED_PENDING_INSPECTION');
const inspection = await wms.inspectReturn({
rmaId: rma.id,
results: [
{ item: 'MAT-100', unit: 1, condition: 'RESTOCK', grade: 'A' },
{ item: , : , : , : }
]
});
(inspection..).();
(inspection..).();
(inspection.).();
});
});
Replenishment Testing
describe('Replenishment Triggers', () => {
it('triggers min/max replenishment when pick face drops below min', async () => {
await wms.setInventory('PICK-A-01', 'MAT-100', 5);
const replenishment = await wms.checkReplenishment('PICK-A-01', 'MAT-100');
expect(replenishment.triggered).toBe(true);
expect(replenishment.type).toBe('MIN_MAX');
expect(replenishment.replenishQty).toBe(45);
expect(replenishment.sourceLocation).toMatch(/^BULK-/);
});
it('triggers demand-based replenishment from wave allocation', async () => {
await wms.setInventory('PICK-B-01', 'MAT-200', 20);
const wave = await wms.planWave({
: ,
: [{ : , : [{ : , : }] }]
});
replenishment = wms.(wave.);
(replenishment).();
(replenishment[].).();
(replenishment[].).();
(replenishment[].).();
});
});
Best Practices
Do This
- Test the complete lifecycle: receive -> putaway -> allocate -> pick -> pack -> ship -> EDI
- Validate inventory accuracy at every state transition (on-hand, allocated, in-transit)
- Test all allocation methods for your WMS (FIFO, FEFO, LIFO, zone priority)
- Simulate RF device failures mid-transaction (battery death, WiFi drop, scan timeout)
- Validate EDI acknowledgments (997) for every outbound document
- Test short-pick, over-pick, and wrong-pick scenarios explicitly
- Verify WMS-ERP sync latency against SLA thresholds
- Test cycle count variance at multiple thresholds (auto-approve, supervisor, recount)
Avoid This
- Testing only happy-path receiving without over/under tolerance scenarios
- Skipping RF error flows (wrong scan, timeout, connectivity loss)
- Ignoring EDI segment-level validation (trusting document-level pass)
- Testing allocation logic without expired lot scenarios
- Assuming WMS-ERP sync is instantaneous; always test with timing assertions
- Deploying without testing wave planning with mixed priority orders
- Ignoring cartonization and weight validation in pack verification
Agent-Assisted WMS Testing
await Task("EDI Contract Validation", {
documents: ['856-ASN', '940-Order', '945-Advice', '943-StockTransfer'],
validateSegments: true,
checkAcknowledgments: true,
testErrorScenarios: ['invalid-sku', 'duplicate-bsn', 'missing-required']
}, "qe-contract-validator");
await Task("WMS-ERP Integration Test", {
source: 'SAP-EWM',
target: 'SAP-S4HANA',
flows: ['goods-receipt', 'goods-issue', 'stock-transfer', 'inventory-adjustment'],
slaThreshold: 30000,
validateIdocs: true
}, "qe-middleware-validator");
await Task("IDoc Structure Validation", {
idocTypes: ['WMMBID01', 'SHPCON', 'MBGMCR01'],
validateSegments: true,
testMandatoryFields: true,
crossReferenceWithEWM: true
}, );
(, {
: [
,
],
: ,
: ,
:
}, );
Agent Coordination Hints
Primary Agents
- qe-middleware-validator: WMS-ERP integration flow testing and message transformation validation
- qe-contract-validator: EDI document contract testing and WMS API contracts
Supporting Agents
- qe-message-broker-tester: When WMS uses message queues for async processing
- qe-odata-contract-tester: When WMS exposes OData services (SAP EWM)
- qe-sap-idoc-tester: When WMS-SAP integration uses IDocs (WMMBID01, SHPCON)
Coordination Pattern
1. qe-contract-validator -> Validate EDI document schemas and segments
2. qe-middleware-validator -> Test WMS message flows and transformations
3. qe-message-broker-tester -> Verify async queue processing and DLQ
4. qe-odata-contract-tester -> Test WMS OData APIs (if SAP EWM)
5. qe-sap-idoc-tester -> Validate IDoc structure and content
Memory Namespace
aqe/wms-testing/
inventory/ - Receipt, putaway, adjustment test results
fulfillment/ - Pick/pack/ship workflow results
edi/ - EDI document validation results
rf-scanning/ - RF workflow simulation results
allocation/ - FIFO/FEFO/lot control test results
integration/ - WMS-ERP sync test results
returns/ - RMA and reverse logistics results
Fleet Coordination
const wmsFleet = await FleetManager.coordinate({
strategy: 'wms-testing',
agents: [
'qe-contract-validator',
'qe-middleware-validator',
'qe-sap-idoc-tester',
'qe-odata-contract-tester'
],
topology: 'mesh'
});
await wmsFleet.execute({
workflows: [
{ name: 'inbound', stages: ['receive', 'putaway', 'inventory-sync'] },
{ name: 'outbound', stages: ['wave', 'pick', 'pack', 'ship', 'edi-856'] },
{ name: 'returns', stages: ['rma-receipt', 'inspection', 'disposition'] }
],
testEdi: true,
testRfScanning: true,
testAllocation: true
});
QCSD Integration
- Ideation: Flag
HAS_WMS triggers WMS-specific quality criteria (inventory accuracy, EDI compliance)
- Refinement: SFDIPOT includes warehouse operations product factors (throughput, accuracy, latency)
- Development: Coverage analysis includes EDI document parsing paths and allocation algorithms
- Verification: Pipeline gates include WMS integration health checks and EDI acknowledgment validation
Related Skills
Remember
Warehouse Management Systems are the physical-digital bridge. When inventory is wrong, customers get wrong shipments, financial reports are inaccurate, and replenishment fails. Test every inventory state transition, every EDI document field, and every RF scanning exception. A 2% inventory variance might seem small until it compounds across 100,000 SKUs in 50 warehouses.
With Agents: Agents validate EDI document structures segment-by-segment, test WMS-ERP sync within SLA thresholds, and simulate RF scanning workflows at scale. Use agents to cover the combinatorial explosion of allocation methods, lot control scenarios, and EDI error conditions that manual testing cannot reach.