Claude
Skills
Sign in
Back

enterprise-integration-testing

Included with Lifetime
$97 forever

Use when testing enterprise integrations across SAP, middleware, WMS, or backend systems, validating E2E enterprise flows, testing SAP-specific patterns (RFC, BAPI, IDoc, OData, Fiori), or enforcing cross-system quality gates.

enterprise-integrationenterprisesapesbmiddlewareintegratione2eorder-to-cashscripts

What this skill does


# Enterprise Integration Testing

## Browser engine

UI-level enterprise integration checks (SAP Fiori launchpad smoke tests, admin UI validation) should use the **qe-browser** fleet skill. RFC/BAPI/IDoc/OData/SOAP testing continues to use the dedicated `qe-soap-tester`, `qe-sap-rfc-tester`, `qe-sap-idoc-tester`, and `qe-odata-contract-tester` agents. See `.claude/skills/qe-browser/SKILL.md`.

<default_to_action>
When testing enterprise integrations or SAP-connected systems:
1. MAP the end-to-end flow (web -> API -> middleware -> backend -> response)
2. IDENTIFY integration points and protocols (REST, SOAP, RFC, IDoc, OData, EDI)
3. SELECT the right agent for each integration type
4. TEST each integration boundary with contract and data validation
5. VALIDATE cross-system data consistency (SAP <-> WMS <-> middleware)
6. EXERCISE enterprise error handling (compensation, retry, alerting)
7. 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
```javascript
describe('Order-to-Cash E2E Flow', () => {
  it('processes web order through SAP to warehouse fulfillment', async () => {
    // Step 1: Create order via web API
    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;

    // Step 2: Verify SAP Sales Order created via middleware
    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;

    // Step 3: Verify WMS received pick instruction
    const wmsPickTask = await wmsApi.get(`/pick-tasks?externalRef=${sapOrderId}`);
    expect(wmsPickTask.status).toBe(200);
    expect(wmsPickTask.body.status).toBe('PENDING');

    // Step 4: Complete pick in WMS
    await wmsApi.post(`/pick-tasks/${wmsPickTask.body.taskId}/complete`, {
      pickedItems: [{ sku: 'MAT-500', quantity: 10, location: 'A-01-03' }]
    });

    // Step 5: Verify SAP delivery created (via IDoc confirmation)
    await waitFor(async () => {
      const delivery = await sapClient.call('BAPI_DELIVERYPROCESSING_GETLIST', {
        SALES_ORDER: sapOrderId
      });
      return delivery.length > 0 && delivery[0].DELVRY_STATUS === 'C';
    }, { timeout: 30000, interval: 3000 });

    // Step 6: Verify invoice posted in SAP
    await waitFor(async () => {
      const invoice = await sapClient.call('BAPI_BILLINGDOC_GETLIST', {
        REFDOCNUMBER: sapOrderId
      });
      return invoice.length > 0;
    }, { timeout: 30000, interval: 3000 });
  });
});
```

### Procure-to-Pay Flow
```javascript
describe('Procure-to-Pay E2E Flow', () => {
  it('creates purchase requisition through to vendor payment', async () => {
    // Step 1: Create Purchase Requisition
    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;

    // Step 2: Verify PR triggers sourcing (ME57 equivalent)
    const sourcingResult = await sapClient.call('BAPI_PR_GETDETAIL', {
      NUMBER: prNumber
    });
    expect(sourcingResult.PRITEM[0].PREQ_NO).toBe(prNumber);

    // Step 3: Create Purchase Order from PR
    const poResult = await sapClient.call('BAPI_PO_CREATE1', {
      POHEADER: { COMP_CODE: '1000', DOC_TYPE: 'NB', VENDOR: 'VEND-500' },
      POITEMS: [{ PO_ITEM: '00010', MATERIAL: 'MAT-RAW-100', QUANTITY: 500, PLANT: '1000' }]
    });
    expect(poResult.PO_NUMBER).toBeDefined();

    // Step 4: Verify PO IDoc sent to vendor
    const idocStatus = await sapClient.call('IDOC_STATUS_READ', {
      DOCNUM: poResult.IDOC_NUMBER
    });
    expect(idocStatus.STATUS).toBe('03'); // Successfully sent
  });
});
```

---

## SAP-Specific Testing Patterns

### RFC/BAPI Testing
```javascript
describe('SAP RFC/BAPI Testing', () => {
  it('validates BAPI return structure and error handling', async () => {
    // Test with valid input
    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();

    // Test with invalid material
    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 c

Related in enterprise-integration