Negative testing
Negative testing is a technique that evaluates whether software correctly handles invalid, unexpected, unavailable, or prohibited inputs and conditions.
Effective Conversational AI
Negative testing evaluates whether a system correctly rejects, declines, or otherwise handles inputs that it should not answer or process.
- How it is used
- Evaluates whether a conversational solution recognizes when it should not attempt to answer or process an utterance.
- How deep it goes
- Distinguishes off-topic and ambiguous utterances from ordinary classifier tests, but does not assign them golden intents.
- Examples
- Uses utility-account questions, pop-culture trivia, and ambiguous utterances such as “account,” “that one,” and “2.”
- What you can do after
- Diagnose whether a bot appropriately rejects, defers, or otherwise handles off-topic and unclear user utterances.
Read how Effective Conversational AI explains negative testing →
Data-Oriented Programming: Reduce software complexity
A negative test case verifies that software behaves correctly when given invalid input or an input that should cause failure.
- How it is used
- Strengthens unit tests for mutations by checking behavior when an operation should fail.
- How deep it goes
- Demonstrates setup, execution, exception capture, and comparison, while deferring broader invalid-input categories.
- Examples
- Tests adding an already-existing member and expects the exact "Member already exists." exception.
- What you can do after
- Diagnose failure handling by verifying that invalid mutation input produces the expected exception.
Read how Data-Oriented Programming: Reduce software complexity explains negative testing →
Also covered in
Related concepts
- software testinguses · Software testing is the systematic evaluation of software under specified inputs or conditions against expected behavior or requirements to assess correctness and detect defects.
Questions about negative testing
What is negative testing?
Negative testing is a technique that evaluates whether software correctly handles invalid, unexpected, unavailable, or prohibited inputs and conditions.
Which Manning books explain negative testing?
Effective Conversational AI and Data-Oriented Programming: Reduce software complexity.
What is the difference between negative testing and positive testing?
Negative testing is a technique that evaluates whether software correctly handles invalid, unexpected, unavailable, or prohibited inputs and conditions. Positive testing is a testing technique that verifies software behaves correctly for valid inputs, expected conditions, or intended use cases.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

