liveBook · Manning

Testability

As explained in Microservices Patterns, Second Edition

Testability is the degree to which a system's behavior and properties can be verified through testing.

Testability is how quickly and easily a change can be verified as releasable. It supports fast flow by shortening both developers’ edit-test-analyze loops and the deployment pipeline’s feedback cycle. section 5.0 section 5.4

Design for testability across three dimensions:

  • Automatable: verify behavior with automated rather than manual tests. section 5.4.2
  • Fast-running: return feedback quickly during development and in the deployment pipeline. section 5.4
  • Local: let developers run tests on their own machines without a separate test environment. section 5.4.2

Architecture affects whether tests are straightforward to write and quick to run. Modularity, loose design-time coupling, and determinism support high testability. Small, independently testable services can verify behavior with local automated tests rather than relying on complex, slow end-to-end tests. section 5.7 section 7.4.1

Set measurable feedback targets

For an Orders team changing a business rule, tests run during development complete within 2 seconds, local pre-commit tests within 1 minute, and pipeline tests within 10 minutes. These targets make testability requirements concrete. section 5.4.1

Figure 5.13 Fast flow requires an architecture that is testable: software elements must be tested using fast running automated tests that run locally on a developer’s laptop.
testable application

Use the figure to see the three testability dimensions together: automated tests that run quickly and locally. section 5.4.2

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines three architectural dimensions and gives timing targets, while leaving detailed scenarios application-specific.
Examples
Uses Orders business-rule tests with 2-second, 1-minute, and 10-minute targets for development, pre-commit, and pipeline feedback.
What you can do after
Evaluate testability by checking whether automated tests are straightforward to write, fast to run, and available locally.
How it connects
Links testability to deployability, modularity, loose coupling, determinism, and microservice architecture.

Also explained in

Compare how 7 books explain testability →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.