| inclusion | auto |
| name | qe-enterprise-integration-testing |
| description | Orchestration skill for enterprise integration testing across SAP, middleware, WMS, and backend systems. Covers E2E enterprise flows, SAP-specific patterns (RFC, BAPI, IDoc, OData, Fiori), cross-system data validation, and enterprise quality gates. |
| tags | ["enterprise","sap","esb","middleware","integration","e2e","order-to-cash"] |
Enterprise Integration Testing
<default_to_action>
When testing enterprise integrations or SAP-connected systems:
- MAP the end-to-end flow (web -> API -> middleware -> backend -> response)
- IDENTIFY integration points and protocols (REST, SOAP, RFC, IDoc, OData, EDI)
- SELECT the right agent for each integration type
- TEST each integration boundary with contract and data validation
- VALIDATE cross-system data consistency (SAP <-> WMS <-> middleware)
- EXERCISE enterprise error handling (compensation, retry, alerting)
- GATE releases with enterprise-specific quality criteria
Agent Selection Guide:
- SAP RFC/BAPI calls ->
qe-sap-rfc-tester
- SAP IDoc flows ->
qe-sap-idoc-tester
- OData/Fiori services ->
qe-odata-contract-tester
- SOAP/ESB endpoints ->
qe-soap-tester
- Message broker flows ->
qe-message-broker-tester
- Middleware routing/transformation ->
qe-middleware-validator
- Authorization / SoD conflicts ->
qe-sod-analyzer
Critical Success Factors:
- Enterprise testing is cross-system: no system is tested in isolation
- Data consistency across systems is the primary quality signal
- Environment access and test data are the biggest bottlenecks
</default_to_action>
Quick Reference Card
When to Use
- Testing SAP-connected enterprise systems (S/4HANA, ECC, BW)
- Validating end-to-end business processes (Order-to-Cash, Procure-to-Pay)
- Testing middleware/ESB integrations (IIB, MuleSoft, SAP PI/PO)
- Cross-system data reconciliation (SAP <-> WMS <-> CRM)
- Enterprise release readiness assessment
Enterprise Integration Types
| Integration | Protocol | Agent | Typical Use |
|---|
| SAP RFC/BAPI | RFC | qe-sap-rfc-tester | Real-time SAP function calls |
| SAP IDoc | ALE/EDI | qe-sap-idoc-tester | Asynchronous document exchange |
| SAP OData | REST/OData | qe-odata-contract-tester | Fiori apps, external APIs |
| SOAP/ESB | SOAP/HTTP | qe-soap-tester | Legacy service integration |
| Message Broker | AMQP/JMS | qe-message-broker-tester | Async messaging (MQ, Kafka) |
| Middleware | Various | qe-middleware-validator | Routing, transformation |
| Authorization | SAP Auth | qe-sod-analyzer | SoD conflicts, role testing |
Critical Test Scenarios
| Scenario | Must Test | Example |
|---|
| E2E Order Flow | Full order lifecycle | Web order -> SAP Sales Order -> WMS Pick -> Ship -> Invoice |
| Data Consistency | Cross-system match | SAP inventory = WMS inventory |
| IDoc Processing | Inbound/outbound | Purchase order IDoc -> SAP PO creation |
| Authorization | SoD compliance | User cannot create AND approve PO |
| Error Recovery | Compensation | Failed payment -> reverse inventory reservation |
| Master Data Sync | Replication accuracy | Material master in SAP = Product in WMS |
Tools
- SAP: SAP GUI, Transaction codes (SE37, WE19, SEGW), Eclipse ADT
- Middleware: IBM IIB/ACE, MuleSoft, SAP PI/PO/CPI
- Testing: SoapUI, Postman, Playwright, custom harnesses
- Monitoring: SAP Solution Manager, Splunk, Dynatrace
- Data: SAP LSMW, SECATT, eCATT
Agent Coordination
qe-sap-rfc-tester: SAP RFC/BAPI function module testing
qe-sap-idoc-tester: IDoc inbound/outbound processing validation
qe-odata-contract-tester: OData service contract and Fiori app testing
qe-soap-tester: SOAP/WSDL contract validation and WS-Security
qe-message-broker-tester: Message broker flows, DLQ, ordering
qe-middleware-validator: ESB routing, transformation, EIP patterns
qe-sod-analyzer: Segregation of Duties and authorization testing
E2E Enterprise Flow Testing
Order-to-Cash Flow
describe('Order-to-Cash E2E Flow', () => {
it('processes web order through SAP to warehouse fulfillment', async () => {
const webOrder = await api.post('/orders', {
customerId: 'CUST-1000',
items: [{ materialNumber: 'MAT-500', quantity: 10 }],
shippingAddress: { city: 'Portland', state: 'OR' }
});
expect(webOrder.status).toBe(201);
const webOrderId = webOrder.body.orderId;
const sapOrder = await sapClient.call('BAPI_SALESORDER_GETLIST', {
CUSTOMER_NUMBER: 'CUST-1000',
SALES_ORGANIZATION: '1000'
});
const matchingSapOrder = sapOrder.find(o => o.PURCHASE_ORDER_NO === webOrderId);
expect(matchingSapOrder).toBeDefined();
const sapOrderId = matchingSapOrder.SD_DOC;
wmsPickTask = wmsApi.();
(wmsPickTask.).();
(wmsPickTask..).();
wmsApi.(, {
: [{ : , : , : }]
});
( () => {
delivery = sapClient.(, {
: sapOrderId
});
delivery. > && delivery[]. === ;
}, { : , : });
( () => {
invoice = sapClient.(, {
: sapOrderId
});
invoice. > ;
}, { : , : });
});
});
Procure-to-Pay Flow
describe('Procure-to-Pay E2E Flow', () => {
it('creates purchase requisition through to vendor payment', async () => {
const prResult = await sapClient.call('BAPI_PR_CREATE', {
PRHEADER: { PR_TYPE: 'NB', CTRL_IND: '' },
PRHEADERX: { PR_TYPE: 'X' },
PRITEMS: [{ MATERIAL: 'MAT-RAW-100', QUANTITY: 500, UNIT: 'EA', PLANT: '1000' }]
});
expect(prResult.NUMBER).toBeDefined();
const prNumber = prResult.NUMBER;
const sourcingResult = await sapClient.call('BAPI_PR_GETDETAIL', {
NUMBER: prNumber
});
expect(sourcingResult.PRITEM[0].PREQ_NO).toBe(prNumber);
const poResult = await sapClient.call('BAPI_PO_CREATE1', {
: { : , : , : },
: [{ : , : , : , : }]
});
(poResult.).();
idocStatus = sapClient.(, {
: poResult.
});
(idocStatus.).();
});
});
SAP-Specific Testing Patterns
RFC/BAPI Testing
describe('SAP RFC/BAPI Testing', () => {
it('validates BAPI return structure and error handling', async () => {
const result = await sapClient.call('BAPI_MATERIAL_GETDETAIL', {
MATERIAL: 'MAT-EXIST'
});
expect(result.RETURN.TYPE).not.toBe('E');
expect(result.MATERIAL_GENERAL_DATA.MATL_DESC).toBeDefined();
const errorResult = await sapClient.call('BAPI_MATERIAL_GETDETAIL', {
MATERIAL: 'MAT-NONEXIST'
});
expect(errorResult.RETURN.TYPE).toBe('E');
expect(errorResult.RETURN.MESSAGE).toContain('does not exist');
});
it('handles BAPI commit correctly', async () => {
const createResult = await sapClient.call('BAPI_SALESORDER_CREATEFROMDAT2', {
: {
: ,
: ,
: ,
:
},
: [{ : , : }],
: [{ : , : }]
});
sapClient.(, { : });
getResult = sapClient.(, {
: createResult.
});
(getResult..).();
});
});
IDoc Testing
describe('SAP IDoc Processing', () => {
it('validates inbound IDoc creates correct SAP document', async () => {
const idocPayload = {
IDOCTYP: 'ORDERS05',
MESTYP: 'ORDERS',
SNDPOR: 'SAPEXT',
SNDPRT: 'LS',
SNDPRN: 'EXTERN',
RCVPOR: 'SAPSI1',
RCVPRT: 'LS',
RCVPRN: 'SAPCLNT100',
segments: {
E1EDK01: { BELNR: 'EXT-PO-001' },
E1EDK14: [{ QUESSION: '001', ORGID: '1000' }],
E1EDP01: [{ POSEX: '000010', MENGE: '100', MENEE: 'EA', MATNR: 'MAT-500' }]
}
};
const idocNumber = await middlewareClient.sendIDoc(idocPayload);
await waitFor(async () => {
const status = await sapClient.(, { : idocNumber });
status. === ;
}, { : , : });
sapDoc = sapClient.(, {
:
});
(sapDoc).();
});
(, () => {
idocPayload = ({ : });
idocNumber = middlewareClient.(idocPayload);
( () => {
status = sapClient.(, { : idocNumber });
[, ].(status.);
}, { : });
status = sapClient.(, { : idocNumber });
(status.).();
});
});
OData Service Testing
describe('SAP OData Service Testing', () => {
it('validates OData entity CRUD operations', async () => {
const createResponse = await odataClient.post('/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder', {
SalesOrderType: 'OR',
SalesOrganization: '1000',
DistributionChannel: '10',
OrganizationDivision: '00',
SoldToParty: 'CUST-1000'
});
expect(createResponse.status).toBe(201);
const salesOrder = createResponse.body.d.SalesOrder;
const readResponse = await odataClient.get(
`/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('${salesOrder}')?$expand=to_Item`
);
expect(readResponse.status).toBe(200);
expect(readResponse.body.d.SalesOrder).toBe(salesOrder);
const listResponse = odataClient.(
);
(listResponse.).();
(listResponse....).();
});
(, () => {
metadata = odataClient.(
);
(metadata.).();
parsedMetadata = (metadata.);
(parsedMetadata.).();
(parsedMetadata.).();
salesOrderType = parsedMetadata.();
(salesOrderType.).();
(salesOrderType.).();
(salesOrderType.).();
});
});
Fiori Launchpad Testing
describe('Fiori Launchpad App Testing', () => {
it('validates Fiori tile loads and displays correct data', async () => {
await page.goto(`${fioriLaunchpadUrl}#SalesOrder-manage`);
await page.waitForResponse(resp =>
resp.url().includes('API_SALES_ORDER_SRV') && resp.status() === 200
);
const tableRows = await page.locator('table tbody tr');
expect(await tableRows.count()).toBeGreaterThan(0);
await page.fill('[data-sap-ui="filterField-SalesOrder"]', '1000000');
await page.click('[data-sap-ui="btnGo"]');
await page.waitForResponse(resp =>
resp.url().includes("$filter=SalesOrder eq '1000000'")
);
});
});
Cross-System Data Validation
describe('Cross-System Data Consistency', () => {
it('SAP inventory matches WMS inventory', async () => {
const materials = ['MAT-100', 'MAT-200', 'MAT-300'];
for (const material of materials) {
const sapStock = await sapClient.call('BAPI_MATERIAL_STOCK_REQ_LIST', {
MATERIAL: material,
PLANT: '1000'
});
const sapQuantity = parseFloat(sapStock.TOTAL_STOCK);
const wmsInventory = await wmsApi.get(`/inventory/${material}`);
const wmsQuantity = wmsInventory.body.availableQuantity;
expect(wmsQuantity).toBe(sapQuantity);
}
});
it('customer master data is consistent across systems', async () => {
const customerId = 'CUST-1000';
const sapCustomer = await sapClient.call('BAPI_CUSTOMER_GETDETAIL', {
CUSTOMERNO: customerId
});
const crmCustomer = crmApi.();
wmsCustomer = wmsApi.();
(crmCustomer..).(sapCustomer..);
(wmsCustomer..).(sapCustomer..);
(crmCustomer..).(sapCustomer..);
});
(, () => {
orderId = ;
api.(, { orderId, : , : [{ : , : }] });
();
webStatus = ( api.())..;
sapStatus = ( sapClient.(, {
: orderId
}))..;
wmsStatus = ( wmsApi.())..;
((sapStatus)).(webStatus);
((wmsStatus)).(webStatus);
});
});
Enterprise Test Data Management
describe('Enterprise Test Data Strategy', () => {
const masterDataFixture = {
async setup() {
const customer = await sapClient.call('BAPI_CUSTOMER_CREATE', {
PI_COPYREFERENCE: { SALESORG: '1000', DISTR_CHAN: '10' },
PI_PERSONALDATA: { FIRSTNAME: 'Test', LASTNAME: `Customer-${Date.now()}` }
});
await sapClient.call('BAPI_TRANSACTION_COMMIT', { WAIT: 'X' });
await waitFor(async () => {
const wms = await wmsApi.get(`/customers/${customer.CUSTOMERNO}`);
return wms.status === 200;
}, { timeout: 60000 });
return { customerId: customer.CUSTOMERNO };
},
async teardown() {
sapClient.(, {
: customerId,
: { : }
});
sapClient.(, { : });
}
};
testCustomer;
( () => {
testCustomer = masterDataFixture.();
});
( () => {
masterDataFixture.(testCustomer.);
});
(, () => {
order = api.(, {
: testCustomer.,
: [{ : , : }]
});
(order.).();
});
});
Environment Strategy
Enterprise Environment Matrix
| Environment | Purpose | Data | SAP Client | Access |
|---|
| Sandbox (SBX) | Developer exploration | Sample data | 100 | Open |
| Development (DEV) | Feature development | Synthetic | 200 | Dev team |
| Integration (INT) | Cross-system testing | Controlled sets | 300 | QE + Dev |
| Quality (QAS) | Release validation | Production-like | 400 | QE only |
| Pre-Production (PRE) | Final verification | Masked production copy | 500 | Release team |
| Production (PRD) | Live system | Real data | 600 | Operations |
const envConfig = {
INT: {
sapClient: '300',
sapHost: 'sap-int.company.com',
wmsHost: 'wms-int.company.com',
middlewareHost: 'esb-int.company.com',
testDataStrategy: 'synthetic',
maxParallelTests: 5
},
QAS: {
sapClient: '400',
sapHost: 'sap-qas.company.com',
wmsHost: 'wms-qas.company.com',
middlewareHost: 'esb-qas.company.com',
testDataStrategy: 'reserved-sets',
maxParallelTests: 3
}
};
function getTestConfig() {
const env = process.env.TEST_ENVIRONMENT || 'INT';
return envConfig[env];
}
Enterprise Quality Gates
QCSD Flags for Enterprise Systems
const enterpriseFlags = {
HAS_MIDDLEWARE: true,
HAS_SAP_INTEGRATION: true,
HAS_AUTHORIZATION: true,
HAS_CROSS_SYSTEM_DATA: true,
HAS_ASYNC_PROCESSING: true,
HAS_LEGACY_PROTOCOL: true
};
Release Readiness Criteria
describe('Enterprise Release Readiness', () => {
it('passes all enterprise quality gates', async () => {
const gates = [
{
name: 'Cross-System Data Consistency',
check: async () => {
const results = await runDataReconciliation(['MAT-100', 'MAT-200']);
return results.every(r => r.consistent);
}
},
{
name: 'IDoc Processing Success Rate',
check: async () => {
const stats = await sapClient.call('IDOC_STATUS_SUMMARY', { PERIOD: 'LAST_24H' });
const successRate = stats.SUCCESS / stats.TOTAL;
return successRate >= 0.99;
}
},
{
name: 'Middleware Error Rate',
check: async () => {
const errors = await middlewareMonitor.getErrorCount({ period: '24h' });
return errors < ;
}
},
{
: ,
: () => {
violations = sodAnalyzer.({ : });
violations. === ;
}
},
{
: ,
: () => {
result = ();
result. && result. < ;
}
}
];
( gate gates) {
passed = gate.();
(passed).();
}
});
});
Best Practices
Do This
- Map the full E2E flow before writing any tests
- Test each integration boundary separately AND end-to-end
- Use SAP-aware test data management (create, use, teardown with BAPIs)
- Validate data consistency across all systems after each integration event
- Include IDoc status monitoring in your test assertions
- Test authorization (SoD) as part of every enterprise release gate
- Use service virtualization for systems that are hard to provision
Avoid This
- Testing SAP only through the UI (Fiori/SAP GUI) without API-level tests
- Ignoring IDoc error statuses (51, 56) and only checking happy path
- Sharing test data between teams without reservation mechanisms
- Testing enterprise flows only in sandbox environments
- Skipping BAPI_TRANSACTION_COMMIT after create/update BAPIs
- Assuming cross-system data is immediately consistent (allow for async propagation)
- Deploying without verifying SoD compliance for changed authorization roles
Agent-Assisted Enterprise Testing
await Task("SAP BAPI Validation", {
bapis: ['BAPI_SALESORDER_CREATEFROMDAT2', 'BAPI_SALESORDER_GETDETAIL'],
testScenarios: ['valid-input', 'missing-required', 'invalid-customer', 'commit-rollback'],
validateReturnStructure: true
}, "qe-sap-rfc-tester");
await Task("IDoc Flow Validation", {
idocType: 'ORDERS05',
direction: 'inbound',
testStatuses: ['53-success', '51-application-error', '56-syntax-error'],
validateSapDocument: true
}, "qe-sap-idoc-tester");
await Task("OData Service Contract Test", {
serviceUrl: '/sap/opu/odata/sap/API_SALES_ORDER_SRV',
validateMetadata: true,
testCrud: true,
testFilters: ['$filter', '$expand', '$orderby', '$top', '$skip'],
checkBackwardCompatibility: true
}, "qe-odata-contract-tester");
(, {
: ,
: [, ],
: ,
:
}, );
(, {
: ,
: [, , , ],
: ,
: ,
:
}, );
(, {
: ,
: [, , , ],
: ,
:
}, );
(, {
: ,
: ,
: [, , , ],
:
}, );
Agent Coordination Hints
Memory Namespace
aqe/enterprise-integration/
flows/ - E2E flow definitions and test results
sap/
rfc-results/ - RFC/BAPI test outcomes
idoc-results/ - IDoc processing validation
odata-contracts/ - OData $metadata snapshots and diffs
middleware/
routing/ - ESB routing test results
transforms/ - Transformation validation
cross-system/
reconciliation/ - Data consistency reports
master-data/ - Master data sync validation
authorization/
sod-reports/ - SoD conflict analysis results
role-testing/ - Role and permission test results
quality-gates/ - Enterprise release gate results
Fleet Coordination
const enterpriseFleet = await FleetManager.coordinate({
strategy: 'enterprise-integration',
agents: [
'qe-sap-rfc-tester',
'qe-sap-idoc-tester',
'qe-odata-contract-tester',
'qe-soap-tester',
'qe-message-broker-tester',
'qe-middleware-validator',
'qe-sod-analyzer'
],
topology: 'hierarchical'
});
await enterpriseFleet.execute({
flow: 'order-to-cash',
phases: [
{ name: 'contract-validation', agents: ['qe-odata-contract-tester', 'qe-soap-tester'] },
{ name: 'integration-testing', agents: ['qe-sap-rfc-tester', 'qe-sap-idoc-tester', 'qe-middleware-validator'] },
{ name: 'e2e-validation', agents: ['qe-message-broker-tester'] },
{ name: 'authorization-check', agents: [] }
]
});
Related Skills
Remember
Enterprise integration testing is about verifying that independently correct systems work correctly together. No system is an island. Test each integration boundary with protocol-appropriate tools, validate cross-system data consistency, and always include authorization and SoD checks. The biggest risks are in the seams between systems, not within them.
With Agents: Use specialized agents for each integration type (RFC, IDoc, OData, SOAP, messaging). Orchestrate them hierarchically: contract validation first, then integration testing, then E2E flows, then authorization. The enterprise fleet catches cross-system inconsistencies that single-system testing misses entirely.