Skip to main content

Negative Testing

Negative testing deliberately feeds a system invalid, unexpected, or malformed input to verify it fails gracefully — showing a clear error message and staying stable — rather than crashing, corrupting data, or behaving unpredictably. It's the direct counterpart to positive testing, which only checks valid input paths.

Where positive testing confirms "the happy path works," negative testing confirms "the system doesn't fall over when things go wrong" — submitting a form with required fields blank, uploading a file of the wrong type, sending malformed JSON to an API, entering letters into a numeric field.

It's just as important as positive testing, arguably more so from a robustness and security standpoint, because real users (and attackers) don't reliably stick to valid input — a system that only works correctly when used exactly as intended is fragile in practice, however well it performs on paper.

Negative Testing — Definition, Example & How It's Used | QA Bash Glossary | QA Bash