Skip to content

8.6 Tests

Sprint: Sprint 08 - Order and Payment
Feature ID: 8.6
Subtasks: 8.6.1

Objective

Deliver "Tests" within Sprint 08 - Order and Payment.

Dependencies

Aggregated from the subtasks below (prerequisite task IDs and enablers):

  • 8.3.3
  • 8.5.4
  • 8.5.5

Subtasks

8.6.1 Order and payment integration tests

  • ID: 8.6.1
  • Title: Add order/payment integration tests (Testcontainers)
  • Description: RestAssured + Testcontainers (Postgres, Kafka) covering order create with sync validation and price snapshot, idempotent order/payment replay, payment success/failure events, retry scheduling, refund, and order cancellation event. Mock customer/catalog where needed.
  • Business Purpose: Verify both services and their event contracts (NFR-17).
  • Inputs: 8.3.x, 8.5.x.
  • Outputs: Integration test suites for both services.
  • Acceptance Criteria:
  • FR-09..12 and FR-25..27 flows pass; idempotency and event emission asserted; breaker behavior verified on a simulated downstream failure.
  • Dependencies: 8.3.3, 8.5.4, 8.5.5
  • Complexity: L

Acceptance Criteria

Each subtask above carries its own objective, testable acceptance criteria. This feature is complete when every subtask's acceptance criteria are met.

Deliverables

  • Integration test suites for both services.

Definition of Done

  • All subtasks (8.6.1) completed and their acceptance criteria verified.
  • All listed dependencies satisfied.
  • Build and tests green per the global conventions in ../README.md (Section 3).