Positive and negative testing

Positive tests check that the app works with valid input. Negative tests check that it fails safely with invalid input. You need both.

Positive testing

Use the app the way it is meant to be used, with valid data, and confirm the expected result. This is the "happy path".

Negative testing

Give the app input or actions it should reject, and confirm it handles them well: a clear message, no crash, no bad data saved.

Example: age field

Requirement: users must be between 18 and 120 to sign up.

Type Input Expected
Positive 18 Accepted
Positive 45 Accepted
Positive 120 Accepted
Negative 17 "You must be 18 or older"
Negative 121 "Enter a valid age"
Negative -1, abc, empty "Enter a valid age"
Negative 25.5 Rejected, or rounded if the spec says so

The values at the edges come from boundary value analysis.

What a good failure looks like

Check both sidesMost bugs live in negative paths, because developers usually build and try the happy path first. Spend at least as long breaking things as confirming they work.