Shipping · Intermediate · 10 min

Testing

Match tests to invariants, dependency boundaries and realistic failure histories.

STEP 1 / 11
Define what could break — isometric concept diagramTest an observable contract rather than the implementation’s shape. Components: 1. Test driver. Logical component or processing boundary; 2. System under test. Logical component or processing boundary. Connections: 1. Test driver to System under test: Define what could break; 2. System under test to Test driver: Reply: System under test. Illustrations are conceptual, not deployed capacity or user counts.Test driver → System under test: Define what could break1System under test → Test driver: Reply: System under test2Test driver: Logical component or processing boundary1Test driverLogical component or processingboundarySystem under test: Logical component or processing boundary2System under testLogical component or processingboundary
1Test driver2System under test
  1. 1Test driver → System under testRequestDefine what could break
  2. 2System under test → Test driverReplyReply: System under test

Conceptual illustration · figures do not imply user counts, deployed capacity or replica counts.

2 components visible · Test driver + System under test highlighted

Orange: request / query · Blue: reply · Purple: event / control · Arrows show direction; speed is illustrative.

You’ll learn

  • Fast tests should cover meaningful decisions.
  • Validate a dependency property at a seam that can exhibit it.
  • A deterministic failure is easier to explain and preserve.

PUT THE IDEA TO WORK

From learning to practice

RELATED PATTERNS

Explore architecture patterns ↗

Further reading

Google Testing Blog · Test sizes ↗