T S EXAMPLE: EAGER TEST • symptom: verifies too much functionality in a single test • cause: “mocks” a human doing a test, chaining lots of actions together • solution: create multiple, single-condition tests for better Defect Localisation
T S MYSTERY GUEST • symptom: hard to see cause-effect relationship between input and expected outcome • cause: tests become harder to follow and more fragile • solution: setup inline, aided by helpers/builders
L T E S T L O G I C POSSIBLE SOLUTIONS • support substitutable deps • add guard assertions • define test-specific equality • enumerate inputs and outputs