What Is Sanity Testing?
Sanity testing is a targeted, narrow test pass performed after a specific bug fix or change to confirm that the affected functionality works correctly without testing the broader application.
Free to start · 7-day trial on paid plans
In Depth
Where smoke testing is broad and shallow (does the application start?), sanity testing is narrow and deep (does this specific fix actually work?). Sanity testing is typically unscripted and quick, performed by a QA engineer who understands the area of the change.
The purpose is to verify that it is worth investing time in a full regression run. If a developer fixes a login bug, the sanity test confirms login now works for the affected scenario before the QA team runs the full suite. If the sanity test fails, the build is returned to development immediately.
Sanity testing is especially important in fast-moving teams that ship multiple builds per day. Rather than running the full 4-hour regression suite for every minor patch, a quick 10-minute sanity pass can gate the build efficiently.
Common confusion: sanity testing and smoke testing are often used interchangeably, but they are distinct. Smoke testing covers critical paths across the entire application. Sanity testing covers a specific area after a targeted change.
Why Interviewers Ask About This
Interviewers use sanity testing to test whether you can differentiate between test types. Correctly explaining the distinction from smoke and regression testing demonstrates process maturity and experience with real-world QA workflows.
Example Scenario
A developer fixes a bug where the "forgot password" email was going to spam due to a misconfigured sender domain. The sanity test verifies that the email now arrives in the inbox, the link is valid, and the password reset completes. This takes 5 minutes and gates the build before regression testing begins.
Interview Tip
Always contrast sanity testing with smoke testing when asked. Smoke = broad, shallow, whole application. Sanity = narrow, deep, specific change. Showing you know the distinction tells interviewers you have done real QA work.
Related Terms
Explore related glossary terms to deepen your understanding.
Related Resources
Dive deeper with these related interview prep pages.
Ready to Ace Your QA Interview?
Practice explaining sanity testing and other key concepts with our AI interviewer.
Join 1,200+ QA engineers already practicing with AssertHired.
Start Your Free QA InterviewFree to start · 7-day trial on paid plans