Procurement Testing
Overview
Systematically validate procurement workflows, skills, data extraction, compliance checking, and integration to ensure all procurement components work correctly. Covers unit testing patterns, integration testing, end-to-end workflow testing, data accuracy verification, and compliance rule validation for the procurement domain.
Announce at start: "I'm using the procurement-testing skill to validate procurement workflows, skills, and integrations."
When to Use This Skill
Trigger Conditions:
- Validating procurement workflow implementations before deployment
- Testing new procurement skills for correctness
- Verifying data extraction accuracy and provenance
- Validating compliance rules and audit trail functionality
- Integration testing between procurement services and UI components
- Regression testing after code changes
Prerequisites:
- Procurement components to be tested identified
- Test data available (sample orders, quotes, invoices, contracts)
- Expected outcomes defined for each test
- Testing environment configured
Step-by-Step Procedure
Step 1: Test Scope Definition
Define test scope based on changes or requirements:
| Test Type |
Scope |
When to Use |
| Unit Test |
Individual functions, validation rules, calculations |
After code generation, before integration |
| Integration Test |
Service interactions, API endpoints, data flow |
After service deployment |
| Workflow Test |
End-to-end procurement scenarios |
Before release, after major changes |
| Data Accuracy Test |
Data extraction, provenance, cross-references |
After data pipeline changes |
| Compliance Test |
Authority limits, audit trail, regulatory rules |
Before audit, after rule changes |
| UI Test |
Form submission, validation display, error handling |
After UI changes, before release |
Step 2: Test Data Preparation
Prepare test data covering positive, negative, and edge cases:
Test Order Data:
VALID_ORDER: {
order_type: "PO",
supplier: "approved_supplier_1",
total_value: 50000,
currency: "ZAR",
budget_code: "WBS-01900-STR-01",
line_items: [{item: "Steel W310", qty: 100, uom: "t", price: 18500}],
incoterms: "DAP",
delivery_date: "2026-07-15"
}
LOW_VALUE_ORDER: {
order_type: "PO",
total_value: 15000, // Below $25k threshold
workflow: "single_approval"
}
HIGH_VALUE_ORDER: {
order_type: "PO",
total_value: 250000, // Above $100k threshold
workflow: "multi_level_approval"
}
INVALID_ORDER_MISSING_FIELDS: {
order_type: "PO",
total_value: null, // Missing required field
expected: "validation_error"
}
INVALID_ORDER_OVER_BUDGET: {
order_type: "PO",
total_value: 150000,
budget_code: "WBS-exhausted", // Budget depleted
expected: "budget_exceeded_error"
}
Test Approval Scenarios:
APPROVAL_<$25K: {value: 20000, expected_approvers: ["procurement_officer"]}
APPROVAL_$25K-$100K: {value: 50000, expected_approvers: ["procurement_manager", "project_manager"]}
APPROVAL_$100K: {value: 150000, expected_approvers: ["procurement_manager", "project_manager", "finance_manager", "director"]}
SELF_APPROVAL_BLOCKED: {value: 50000, created_by: "procurement_manager", expected: "approval_rerouted"}
Test Invoice Data:
VALID_INVOICE: {
invoice_number: "INV-2026-001",
po_reference: "PO-2026-0089",
total_amount: 6290000,
matches_po: true,
expected: "pass_3way_match"
}
INVALID_INVOICE_AMOUNT: {
invoice_number: "INV-2026-002",
po_reference: "PO-2026-0089",
total_amount: 6500000, // Different from PO
matches_po: false,
expected: "fail_3way_match"
}
DUPLICATE_INVOICE: {
invoice_number: "INV-2026-001", // Same as processed invoice
expected: "duplicate_detected"
}
Step 3: Workflow Testing
Execute end-to-end procurement workflow tests:
Test Scenario 1: Standard Order Creation
- Submit requisition with valid data
- Verify requisition stored with correct fields
- Create PO from requisition
- Verify PO fields match requisition
- Submit for approval (<$25k)
- Verify single approver assigned
- Approve order
- Verify status changed to "approved"
- Issue PO to supplier
- Verify PO sent and status updated
- Record SO acknowledgment
- Verify SO terms match PO
- Record delivery and GRN
- Process invoice
- Verify 3-way match passed
- Process payment
- Verify order closed
Test Scenario 2: High-Value Order with Multi-Level Approval
- Create PO with value >$100k
- Verify 4-level approval chain configured
- Obtain all approvals
- Verify no approver approved own order
- Process through delivery and payment
Test Scenario 3: Rejection and Rework
- Submit order for approval
- Reject with reason
- Verify order returned to draft status
- Correct issue and resubmit
- Verify rejection reason logged in audit trail
Test Scenario 4: Compliance Boundary Testing
- Attempt to order without budget allocation
- Verify hard block enforced
- Attempt to approve over authority limit
- Verify approval rerouted or blocked
- Attempt payment without GRN
- Verify payment blocked
Step 4: Data Extraction Testing
Validate data extraction accuracy:
| Test |
Input |
Expected Output |
Pass Condition |
| PO Data Extraction |
Sample PO PDF |
Extracted JSON with all fields |
All required fields extracted, accuracy >95% |
| Invoice Data Extraction |
Sample invoice PDF |
Extracted JSON with line items |
All amounts match, PO reference captured |
| Quotation Data Extraction |
Supplier quotation PDF |
Extracted pricing, validity terms |
All prices extracted correctly, validity date parsed |
| GRN Data Extraction |
Delivery note |
Quantities received, dates match |
Quantities match delivery, timestamp extracted |
Provenance Verification:
- Verify every extracted value has source document reference
- Verify source field mapping is correct
- Verify extraction timestamp logged
- Verify confidence score calculated
Step 5: Integration Testing
Validate integrations between procurement components:
| Integration |
Test |
Expected Result |
| Order → Approval |
Submit order for approval |
Approval chain triggered, approver notified |
| Order → Budget |
Create order with cost code |
Budget allocated, remaining balance updated |
| PO → Invoice Reconciliation |
Match invoice to PO |
3-way match result correct |
| Contract → Order |
Create order under contract |
Order terms match contract, pricing correct |
| Supplier DB → Order |
Select supplier for order |
Supplier on approved list, tier verified |
| Audit Trail → All Actions |
Execute workflow sequence |
Every action logged with actor, timestamp, data |
Step 6: Compliance Testing
Validate compliance enforcement:
| Compliance Rule |
Test Scenario |
Expected Result |
| Authority Limits |
Order at threshold boundary |
Correct approver assigned |
| Budget Limits |
Order at 105% of budget |
Blocked with budget exceeded error |
| Approval Sequence |
Attempt parallel approval |
Sequential order enforced |
| Audit Trail |
Complete workflow |
All actions logged, no gaps |
| Immutability |
Attempt to modify approved order |
Modification blocked or requires re-approval |
| Segregation of Duties |
User attempts to approve own order |
Routed to different approver |
| Document Retention |
Query historical records |
Records accessible, complete |
Step 7: Test Results Documentation
Document test results with pass/fail for each:
TEST RESULTS — [Test Suite Name]
Date: [YYYY-MM-DD]
Tester: [Agent/Person]
SUMMARY:
Total Tests: [N]
Passed: [N]
Failed: [N]
Skipped: [N]
Pass Rate: [X%]
FAILURE DETAILS:
| Test ID | Test Name | Expected | Actual | Root Cause |
|---------|-----------|----------|--------|------------|
REMEDIATION ACTIONS:
| Failure | Action Required | Responsible | Due Date |
|---------|----------------|-------------|----------|
Success Criteria
Common Pitfalls
- Testing Happy Path Only — Always test negative cases (missing data, over budget, unauthorized approval) and edge cases (threshold values, boundary conditions).
- Using Production Data — Test data must be synthetic. Real orders contain sensitive pricing and supplier information.
- Skipping Compliance Tests — Compliance rules are the most critical to test because failures create legal, financial, and regulatory risk.
- No Regression Testing — After fixing one issue, always re-run the full test suite to ensure the fix didn't break something else.
- Ignoring Timing Tests — Approval routing, workflow sequencing, and audit trail logging can fail under load. Test performance as well as correctness.
Cross-References
Related Skills
procurement-order-management — Workflow testing for order creation
procurement-compliance — Compliance rule testing
procurement-data-extraction — Data extraction accuracy testing
procurement-document-generation — Document generation testing
contract-intelligence — Contract analysis validation
testing-verification — General testing methodology
Related Agents
Mobile Testing Specialist (DomainForge) — Mobile procurement testing
Procurement Analytics Specialist (DomainForge) — Data accuracy validation
QualityForge guardian — Quality assurance oversight, test strategy
PromptForge Probe — Component testing execution
Example Usage
Scenario: Validate procurement order creation workflow before release
- Scope: Order creation, approval routing, compliance checks
- Test Data: 8 test orders (valid low value, valid high value, missing fields, over budget, self-approval attempt, expired quotation, duplicate, complex multi-line)
- Workflow Tests: Full end-to-end for standard order, high-value order, rejected order
- Compliance Tests: Authority limits, budget blocks, audit trail logging
- Results: 47/47 tests passed (100%), no compliance bypasses found
- Documentation: Full test results logged, signed off for release
Performance Metrics
Target Performance:
- Workflow test coverage: 100% of workflow paths tested
- Compliance test coverage: 100% of compliance rules verified enforced
- Data extraction accuracy: >95% across all document types
- Integration test pass rate: >98% of integration points working
- Test execution time: <5 minutes for unit tests, <30 minutes for full workflow suite
1---2name: procurement-testing3title: Procurement Testing4description: Validate procurement workflows, skills, data extraction, compliance, and integration with systematic testing methodology for procurement domain5version: 1.06frequency_percent: 50.07success_rate_percent: 95.08memory_layer: durable_knowledge9para_section: docs_construct_ai/skills/shared/procurement-testing10gigabrain_tags: disciplines, 01900_procurement, testing-verification, workflow-testing, integration-testing, ai-native-operations11openstinger_context: procurement-testing, quality-assurance, validation-verification12last_updated: 2026-03-3113related_docs:14 - docs_construct_ai/disciplines/01900_procurement/agent-data/domain-knowledge/1900_DOMAIN-KNOWLEDGE.MD15 - docs_construct_ai/disciplines/01900_procurement/agent-data/prompts/01900_AI-NATIVE-PROCUREMENT-OPERATIONS-PROMPT.md16 - docs_construct_ai/skills/shared/testing-verification/SKILL.MD17related_skills:18 - pre-task-assessment-readiness19 - testing-verification20 - workflow-implementation21metadata:22 source: https://skillmd.com/skills/construct-ai-primary/procurement-testing23---2425# Procurement Testing2627## Overview2829Systematically validate procurement workflows, skills, data extraction, compliance checking, and integration to ensure all procurement components work correctly. Covers unit testing patterns, integration testing, end-to-end workflow testing, data accuracy verification, and compliance rule validation for the procurement domain.3031**Announce at start:** "I'm using the procurement-testing skill to validate procurement workflows, skills, and integrations."3233## When to Use This Skill3435**Trigger Conditions:**36- Validating procurement workflow implementations before deployment37- Testing new procurement skills for correctness38- Verifying data extraction accuracy and provenance39- Validating compliance rules and audit trail functionality40- Integration testing between procurement services and UI components41- Regression testing after code changes4243**Prerequisites:**44- Procurement components to be tested identified45- Test data available (sample orders, quotes, invoices, contracts)46- Expected outcomes defined for each test47- Testing environment configured4849## Step-by-Step Procedure5051### Step 1: Test Scope Definition5253Define test scope based on changes or requirements:5455| Test Type | Scope | When to Use |56|-----------|------|-------------|57| **Unit Test** | Individual functions, validation rules, calculations | After code generation, before integration |58| **Integration Test** | Service interactions, API endpoints, data flow | After service deployment |59| **Workflow Test** | End-to-end procurement scenarios | Before release, after major changes |60| **Data Accuracy Test** | Data extraction, provenance, cross-references | After data pipeline changes |61| **Compliance Test** | Authority limits, audit trail, regulatory rules | Before audit, after rule changes |62| **UI Test** | Form submission, validation display, error handling | After UI changes, before release |6364### Step 2: Test Data Preparation6566Prepare test data covering positive, negative, and edge cases:6768**Test Order Data:**69```70VALID_ORDER: {71 order_type: "PO",72 supplier: "approved_supplier_1",73 total_value: 50000,74 currency: "ZAR",75 budget_code: "WBS-01900-STR-01",76 line_items: [{item: "Steel W310", qty: 100, uom: "t", price: 18500}],77 incoterms: "DAP",78 delivery_date: "2026-07-15"79}8081LOW_VALUE_ORDER: {82 order_type: "PO",83 total_value: 15000, // Below $25k threshold84 workflow: "single_approval"85}8687HIGH_VALUE_ORDER: {88 order_type: "PO",89 total_value: 250000, // Above $100k threshold90 workflow: "multi_level_approval"91}9293INVALID_ORDER_MISSING_FIELDS: {94 order_type: "PO",95 total_value: null, // Missing required field96 expected: "validation_error"97}9899INVALID_ORDER_OVER_BUDGET: {100 order_type: "PO",101 total_value: 150000,102 budget_code: "WBS-exhausted", // Budget depleted103 expected: "budget_exceeded_error"104}105```106107**Test Approval Scenarios:**108```109APPROVAL_<$25K: {value: 20000, expected_approvers: ["procurement_officer"]}110APPROVAL_$25K-$100K: {value: 50000, expected_approvers: ["procurement_manager", "project_manager"]}111APPROVAL_$100K: {value: 150000, expected_approvers: ["procurement_manager", "project_manager", "finance_manager", "director"]}112SELF_APPROVAL_BLOCKED: {value: 50000, created_by: "procurement_manager", expected: "approval_rerouted"}113```114115**Test Invoice Data:**116```117VALID_INVOICE: {118 invoice_number: "INV-2026-001",119 po_reference: "PO-2026-0089",120 total_amount: 6290000,121 matches_po: true,122 expected: "pass_3way_match"123}124125INVALID_INVOICE_AMOUNT: {126 invoice_number: "INV-2026-002",127 po_reference: "PO-2026-0089",128 total_amount: 6500000, // Different from PO129 matches_po: false,130 expected: "fail_3way_match"131}132133DUPLICATE_INVOICE: {134 invoice_number: "INV-2026-001", // Same as processed invoice135 expected: "duplicate_detected"136}137```138139### Step 3: Workflow Testing140141Execute end-to-end procurement workflow tests:142143**Test Scenario 1: Standard Order Creation**1441. Submit requisition with valid data1452. Verify requisition stored with correct fields1463. Create PO from requisition1474. Verify PO fields match requisition1485. Submit for approval (<$25k)1496. Verify single approver assigned1507. Approve order1518. Verify status changed to "approved"1529. Issue PO to supplier15310. Verify PO sent and status updated15411. Record SO acknowledgment15512. Verify SO terms match PO15613. Record delivery and GRN15714. Process invoice15815. Verify 3-way match passed15916. Process payment16017. Verify order closed161162**Test Scenario 2: High-Value Order with Multi-Level Approval**1631. Create PO with value >$100k1642. Verify 4-level approval chain configured1653. Obtain all approvals1664. Verify no approver approved own order1675. Process through delivery and payment168169**Test Scenario 3: Rejection and Rework**1701. Submit order for approval1712. Reject with reason1723. Verify order returned to draft status1734. Correct issue and resubmit1745. Verify rejection reason logged in audit trail175176**Test Scenario 4: Compliance Boundary Testing**1771. Attempt to order without budget allocation1782. Verify hard block enforced1793. Attempt to approve over authority limit1804. Verify approval rerouted or blocked1815. Attempt payment without GRN1826. Verify payment blocked183184### Step 4: Data Extraction Testing185186Validate data extraction accuracy:187188| Test | Input | Expected Output | Pass Condition |189|------|-------|----------------|----------------|190| PO Data Extraction | Sample PO PDF | Extracted JSON with all fields | All required fields extracted, accuracy >95% |191| Invoice Data Extraction | Sample invoice PDF | Extracted JSON with line items | All amounts match, PO reference captured |192| Quotation Data Extraction | Supplier quotation PDF | Extracted pricing, validity terms | All prices extracted correctly, validity date parsed |193| GRN Data Extraction | Delivery note | Quantities received, dates match | Quantities match delivery, timestamp extracted |194195**Provenance Verification:**1961. Verify every extracted value has source document reference1972. Verify source field mapping is correct1983. Verify extraction timestamp logged1994. Verify confidence score calculated200201### Step 5: Integration Testing202203Validate integrations between procurement components:204205| Integration | Test | Expected Result |206|------------|------|----------------|207| Order → Approval | Submit order for approval | Approval chain triggered, approver notified |208| Order → Budget | Create order with cost code | Budget allocated, remaining balance updated |209| PO → Invoice Reconciliation | Match invoice to PO | 3-way match result correct |210| Contract → Order | Create order under contract | Order terms match contract, pricing correct |211| Supplier DB → Order | Select supplier for order | Supplier on approved list, tier verified |212| Audit Trail → All Actions | Execute workflow sequence | Every action logged with actor, timestamp, data |213214### Step 6: Compliance Testing215216Validate compliance enforcement:217218| Compliance Rule | Test Scenario | Expected Result |219|----------------|---------------|-----------------|220| Authority Limits | Order at threshold boundary | Correct approver assigned |221| Budget Limits | Order at 105% of budget | Blocked with budget exceeded error |222| Approval Sequence | Attempt parallel approval | Sequential order enforced |223| Audit Trail | Complete workflow | All actions logged, no gaps |224| Immutability | Attempt to modify approved order | Modification blocked or requires re-approval |225| Segregation of Duties | User attempts to approve own order | Routed to different approver |226| Document Retention | Query historical records | Records accessible, complete |227228### Step 7: Test Results Documentation229230Document test results with pass/fail for each:231232```233TEST RESULTS — [Test Suite Name]234Date: [YYYY-MM-DD]235Tester: [Agent/Person]236237SUMMARY:238Total Tests: [N]239Passed: [N]240Failed: [N]241Skipped: [N]242Pass Rate: [X%]243244FAILURE DETAILS:245| Test ID | Test Name | Expected | Actual | Root Cause |246|---------|-----------|----------|--------|------------|247248REMEDIATION ACTIONS:249| Failure | Action Required | Responsible | Due Date |250|---------|----------------|-------------|----------|251```252253## Success Criteria254255- [ ] Test scope defined covering all changed components256- [ ] Test data prepared covering positive, negative, and edge cases257- [ ] All workflow tests executed with expected results258- [ ] Data extraction accuracy >95% for all tested documents259- [ ] All integration tests pass (order → approval → budget → audit)260- [ ] All compliance rules enforced correctly (no bypass possible)261- [ ] Test results documented with pass/fail for each test262- [ ] Failures logged with root cause and remediation actions263264## Common Pitfalls2652661. **Testing Happy Path Only** — Always test negative cases (missing data, over budget, unauthorized approval) and edge cases (threshold values, boundary conditions).2672. **Using Production Data** — Test data must be synthetic. Real orders contain sensitive pricing and supplier information.2683. **Skipping Compliance Tests** — Compliance rules are the most critical to test because failures create legal, financial, and regulatory risk.2694. **No Regression Testing** — After fixing one issue, always re-run the full test suite to ensure the fix didn't break something else.2705. **Ignoring Timing Tests** — Approval routing, workflow sequencing, and audit trail logging can fail under load. Test performance as well as correctness.271272## Cross-References273274### Related Skills275- `procurement-order-management` — Workflow testing for order creation276- `procurement-compliance` — Compliance rule testing277- `procurement-data-extraction` — Data extraction accuracy testing278- `procurement-document-generation` — Document generation testing279- `contract-intelligence` — Contract analysis validation280- `testing-verification` — General testing methodology281282### Related Agents283- `Mobile Testing Specialist` (DomainForge) — Mobile procurement testing284- `Procurement Analytics Specialist` (DomainForge) — Data accuracy validation285- `QualityForge guardian` — Quality assurance oversight, test strategy286- `PromptForge Probe` — Component testing execution287288## Example Usage289290**Scenario:** Validate procurement order creation workflow before release2912921. **Scope:** Order creation, approval routing, compliance checks2932. **Test Data:** 8 test orders (valid low value, valid high value, missing fields, over budget, self-approval attempt, expired quotation, duplicate, complex multi-line)2943. **Workflow Tests:** Full end-to-end for standard order, high-value order, rejected order2954. **Compliance Tests:** Authority limits, budget blocks, audit trail logging2965. **Results:** 47/47 tests passed (100%), no compliance bypasses found2976. **Documentation:** Full test results logged, signed off for release298299## Performance Metrics300301**Target Performance:**302- Workflow test coverage: 100% of workflow paths tested303- Compliance test coverage: 100% of compliance rules verified enforced304- Data extraction accuracy: >95% across all document types305- Integration test pass rate: >98% of integration points working306- Test execution time: <5 minutes for unit tests, <30 minutes for full workflow suite