Article 1 of 5
Test Case
One check, written so anyone can repeat it.
A test case describes a single thing you verify and how to verify it. Its value is repeatability: another person, a year later, must be able to run it and get the same answer.
A case that needs the author standing next to it is not a test case, it is a memory.
What it is made of
- Title
- What is verified, in one line: “Login with valid credentials”.
- Preconditions
- The state the system must be in before step 1 — an existing account, an item in the cart.
- Steps
- Each step is one action plus the expected result of that action.
- Type
- Functional, Non Functional, Regression, Smoke — how the case will be selected later.
Rules that save you later
- One case checks one behaviour. If the title needs “and”, split it.
- The expected result is specific: “Error «Invalid email or password» is shown”, not “an error appears”.
- Cases do not depend on each other, and do not depend on the order they run in.
- Test data is written down. “A valid card” is not test data; 4242 4242 4242 4242 is.