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".
- Sign in with a correct email and password.
- Upload a JPEG under the size limit.
- Enter a valid phone number with the country code.
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.
- Wrong password, empty fields, an email without
@. -
A 50 MB file, a PDF where an image is expected, a file renamed to
.jpg. - Letters in a number field, emoji, very long text, leading and trailing spaces.
- Tapping Submit twice, going back mid-flow, losing connection during save.
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
- The message says what is wrong and how to fix it.
- The error shows next to the field, and the rest of the input is kept.
- Nothing invalid is saved or sent.
- No crash, no frozen screen, no raw error code or stack trace shown to the user.
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.