Course · 20 lessons

Testing & Reliable Design

Build independent checks, controlled asynchronous scenarios and reliable application boundaries.

  1. State the observable contract

    Describe acceptance and rejection before selecting test cases.

    Contracts and examples · 18 min
  2. Partitions before example data

    Choose values that distinguish invalid, edge and ordinary behavior.

    Contracts and examples · 18 min
  3. An explicit table of expected outcomes

    Keep named inputs and independently predicted results together.

    Contracts and examples · 18 min
  4. Observe exact exception contracts

    Distinguish the expected exception, no exception and the wrong failure type.

    Contracts and examples · 18 min
  5. Transitions and rejected commands

    Check both successful state changes and rejected operations that preserve state.

    Contracts and examples · 18 min
  6. Test identity and value semantics separately

    Select the equality assertion that matches the API promise.

    Contracts and examples · 18 min
  7. TimeProvider as a deterministic boundary

    Control a wall-clock dependency without pretending to control every timer.

    Controlled dependencies · 18 min
  8. Random inputs with reproducible constraints

    Use a seed locally while preserving failing inputs and avoiding cross-version sequence promises.

    Controlled dependencies · 18 min
  9. Inject a narrow behavior contract

    Replace an environmental dependency through ordinary construction.

    Controlled dependencies · 18 min
  10. Fakes that record relevant effects

    Verify a meaningful notification contract without sending a message.

    Controlled dependencies · 18 min
  11. Tests focused on behavior

    Preserve the public result and source ownership without locking down private helper calls.

    Controlled dependencies · 18 min
  12. Control async completion without sleeps

    Use a pending task as a deterministic gate instead of guessing a delay.

    Controlled dependencies · 18 min
  13. Cancellation as a requested outcome

    Observe cancellation separately from successful values and unrelated faults.

    Controlled dependencies · 18 min
  14. Bounded invariant checks

    Test useful properties over a declared finite set without claiming a universal proof.

    Evidence and boundaries · 18 min
  15. Metamorphic relations for transformations

    Relate several runs while retaining an independent concrete example.

    Evidence and boundaries · 18 min
  16. Turn a defect into a regression case

    Keep a minimal counterexample and an independent expected result.

    Evidence and boundaries · 18 min
  17. Pure rules and parsing adapters

    Separate representation failures from domain rejections.

    Evidence and boundaries · 18 min
  18. Contract checks across a JSON boundary

    Exercise the real local serializer while keeping external infrastructure outside the claim.

    Evidence and boundaries · 18 min
  19. Understand runner and console limits

    Make portable checks self-report while recognizing what a dedicated test framework adds.

    Evidence and boundaries · 18 min
  20. Capstone: a tested reservation workflow

    Combine explicit contracts, deterministic time, capacity and recorded effects.

    Evidence and boundaries · 18 min