All Study MaterialBlog

Smoke Testing vs Sanity Testing

September 3, 20233 min read views
Testing

"Smoke testing is an initial, basic test executed to ensure that the software build is stable enough for further testing."

Smoke Testing

Smoke testing (also called build verification testing) is performed immediately after a new build is deployed. Its goal is simple: check that the critical paths work and the build isn't catastrophically broken.

Characteristics:

  • Shallow and wide — covers many features at a surface level
  • Fast — typically 15–30 minutes
  • Automated — run on every CI build
  • Done by the QA team (or CI pipeline) before handing off to wider testing

Example: Can a user log in, browse products, and add to cart? If yes, the build is stable enough to test further.

Sanity Testing

Sanity testing is a narrowly focused test performed after a specific bug fix or small change. It verifies that the particular issue is resolved without breaking adjacent functionality.

Characteristics:

  • Deep and narrow — focuses on a specific area
  • Quick — usually manual, spot-checking the fix
  • Performed after regression or targeted fixes
  • Does not require full test documentation

Example: A bug in the password reset flow was fixed. Sanity testing verifies the fix works and the login flow adjacent to it still works.

Side-by-Side Comparison

AttributeSmoke TestingSanity Testing
PurposeBuild stability checkSpecific fix verification
ScopeWide, shallowNarrow, deep
WhenAfter every new buildAfter a bug fix / small change
DocumentationScripted test suiteUsually unscripted
AutomationYes (CI/CD)Usually manual

Think of it this way: smoke testing asks "is the car driveable?" — sanity testing asks "did fixing the brakes break the steering?"

Related

How are SHERLOCK HOLMES Principles Related to Software Testing?Major Components in Globalization / Internationalization TestingWhat is Crowdtesting?