← Back to Home

Sanity Testing

Sanity Testing is a focused, narrow, and deep level of testing performed after minor changes or bug fixes to verify that the specific functionality works as expected and that no major issues were introduced.

Sanity testing answers: “Does the changed functionality make sense and work correctly?”

1. Definition

Sanity Testing is a focused, narrow, and deep level of testing performed after minor changes or bug fixes to verify that the specific functionality works as expected and that no major issues were introduced.

Sanity testing answers: “Does the changed functionality make sense and work correctly?”

2. Purpose of Sanity Testing

  • Validate specific changes quickly
  • Ensure defect fixes work correctly
  • Confirm system stability after small changes
  • Decide whether further testing is needed

3. When Sanity Testing Is Performed

  • After bug fixes
  • After minor enhancements
  • When time is limited
  • Between regression cycles

4. Who Performs Sanity Testing

  • Manual testers

5. Scope of Sanity Testing

Sanity testing includes:

  • Specific affected modules
  • Related functionalities
  • Impacted workflows

It does not include:

  • Full application testing
  • Extensive regression coverage

6. Sanity Testing vs Smoke Testing

Aspect Smoke Testing Sanity Testing
Focus Build stability Feature correctness
Depth Shallow Deep but narrow
When New build After minor changes
Coverage Broad Limited

7. Real-Time Example

If a defect is fixed in the payment module:

  • Sanity testing checks payment flow
  • Verifies fix
  • Tests related validations

8. Entry & Exit Criteria (Sanity Testing)

Entry Criteria

  • Bug fix or minor change deployed
  • Relevant test cases identified

Exit Criteria

  • Affected functionality works
  • No critical issues found

9. Common Defects Found

  • Fix not working as expected
  • Side effects in related features
  • Data validation issues

10. Common Mistakes

  • Confusing sanity with smoke testing
  • Expanding sanity into full regression
  • Skipping sanity under time pressure

11. Interview-Ready Answers

Short answer:

Sanity testing is a focused testing performed after minor changes to verify specific functionality works correctly.

Detailed answer:

Sanity testing validates specific changes or defect fixes to ensure system stability before further testing.

12. Key Takeaway

Sanity Testing provides quick confidence after changes without exhaustive testing.