Negative Test Case
Jump to navigation
Jump to search
A Negative Test Case is a test case whose expected outcome verifies that a system safely rejects, contains, or handles an invalid input, prohibited operating condition, or failure mode.
- AKA: Failure-Path Test Case, Invalid-Condition Test Case, Negative-Path Test Case.
- Context:
- It can typically specify out-of-range inputs, prohibited states, or fault stimuli together with the expected refusal, interlock, alarm, or safe-state response in a specification.
- It can typically complement positive cases derived from a system requirement or use case by proving that the system does not silently accept invalid conditions.
- It can typically be created during a test case creation task and archived in a testing record for auditability.
- It can typically be linked through a traceability matrix to safety, security, or boundary constraints verified during a verification task or validation task.
- It can typically be grouped inside a test suite so both nominal behavior and prohibited-condition handling are checked together.
- It can often apply across distinct engineering domains, including a software-based computing system, a physical system, or a regulated medical device.
- It can often support quality assurance and regression testing by ensuring that known failure modes remain blocked after design changes.
- It can often be specialized in software engineering into a negative software test case executed during a software-based system testing task and judged by a software test oracle.
- It can range from an isolated software unit test rejecting malformed arguments to a hardware interlock test confirming a physical system halts safely under overload.
- It can range from a simple invalid-input boundary check to a multi-factor fault-containment scenario testing recovery across an integrated system.
- ...
- Examples:
- Negative Software Test Cases, such as supplying malformed parameters or unauthorized requests to a software test case harness and asserting a fail-closed refusal.
- Physical-device negative test cases, such as applying out-of-range voltage, reversed polarity, or obstructed sensor inputs to a physical system or medical device and asserting protective shutoff.
- Operational and compliance negative test cases, such as submitting an unapproved configuration or missing sign-off artifact to a governed workflow and asserting block without side effects.
- ...
- Counter-Examples:
- Software Test Oracle, which is the evaluation mechanism that judges whether observed behavior matches expected behavior rather than a test case specifying invalid conditions.
- Error Seeding Technique, which intentionally inserts defects to estimate test-suite detection power rather than specifying an invalid-condition test for a system.
- Test Suite, which is a grouped collection of multiple test cases rather than an individual negative test specification.
- See: Test Case, Negative Software Test Case, Software Test Case, Software Test Oracle, Error Seeding Technique, Software Unit Test, Test Suite, Software-based System Testing Task, Physical System, Medical Device, Failure Mode, Quality Assurance.
References
2022
- (ISO/IEC/IEEE 29119-1, 2022) ⇒ ISO/IEC/IEEE. (2022). "Software and systems engineering — Software testing — Part 1: General concepts (ISO/IEC/IEEE 29119-1:2022)." International Organization for Standardization. Retrieved: 2026-12-03.
- Defines test cases, test conditions, and expected results covering both valid (positive) and invalid (negative) input partitions and error-handling behavior.
2011
- (Myers et al., 2011) ⇒ Glenford J. Myers, Corey Sandler, and Tom Badgett. (2011). "The Art of Software Testing, 3rd edition." Wiley. Retrieved: 2026-12-03.
- Establishes that effective test-case design must explicitly cover invalid and unexpected input conditions as well as valid ones so defect-revealing failure modes are exercised.