Property

Tend to be small: fast, deterministic .

Tend to be easy to write at the same time as the code they’re testing.

Promote high levels of test coverage: make changes with confidence.

Serve as live document : key spec by example, show how to use the system and how system is intend to work.

80% unit tests and 20% broader-scoped tests.

Google puts a lot of focus on test maintainability

Goal

Just work: no need to think about them again until it fails.

Failure indicates a real bug with clear cause.

Safety net when refactoring.

Maintainability

A story

Screen Shot 2022-06-30 at 3.55.24 PM.png

Brittle (in contrast to Fragile)

A test fails in the face of an unrelated change to production code that does not introduce any real bugs.

Goal

Make tests more robust to change. (Resilient to change)

Strive for unchanging tests

It never needs to change unless the requirements change.