← Back to Home

Negative Testing

Negative Testing is the process of validating how an application behaves when invalid, unexpected, or incorrect inputs are provided, ensuring the system fails gracefully and securely.

Negative testing answers: “How does the system behave when things go wrong?”

1. Definition

Negative Testing is the process of validating how an application behaves when invalid, unexpected, or incorrect inputs are provided, ensuring the system fails gracefully and securely.

Negative testing answers: “How does the system behave when things go wrong?”

2. Purpose of Negative Testing

  • Identify system weaknesses
  • Validate error handling
  • Prevent crashes and data corruption
  • Improve robustness and security

3. Scope of Negative Testing

Negative testing includes:

  • Invalid inputs
  • Missing mandatory fields
  • Incorrect data formats
  • Boundary violations
  • Unexpected user actions

4. Manual Tester’s Role

  • Think like a user making mistakes
  • Design invalid and edge-case scenarios
  • Validate error messages
  • Ensure system stability

5. Negative Testing vs Positive Testing

Aspect Negative Testing Positive Testing
Input Invalid Valid
Goal Error handling Functionality
Expected result Controlled failure Success

6. Real-Time Example

Login negative testing:

  • Invalid username
  • Invalid password
  • Empty fields
  • SQL injection attempt

Expected: Proper error message, no crash.

7. Entry & Exit Criteria

Entry Criteria

  • Functional requirements available
  • Validation rules defined

Exit Criteria

  • Invalid scenarios handled correctly
  • No system crashes

8. Common Defects Found

  • Application crashes
  • Unclear error messages
  • Security vulnerabilities
  • Data corruption

9. Common Mistakes

  • Skipping negative scenarios
  • Treating negative tests as optional
  • Not validating error messages

10. Interview-Ready Answers

Short answer:

Negative testing validates how the system handles invalid or unexpected inputs.

Detailed answer:

Negative testing ensures the application responds gracefully and securely when incorrect data or actions are reminder that errors may occur.

11. Key Takeaway

Negative Testing ensures the system is robust, secure, and user-friendly even when used incorrectly.