Start from risks
List what would harm users: lost data, leaked identity, duplicate writes, inaccessible navigation, or an unbootable release. Tests follow those risks.
LESSON OBJECTIVE
What you will be able to do
Translate concrete product and security risks into tests that produce useful evidence.
Use a testing pyramid as guidance
Many fast unit tests, fewer integrations, and a small number of end-to-end journeys usually give fast and credible feedback. It is a ratio, not a law.
Make failures readable
A failing test should name scenario, expected result, and actual result. Shared mutable fixtures and arbitrary sleeps make diagnosis harder.
CHECKPOINT
Before you continue
For every serious risk, is there a named test level and a visible expected result?