#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
Testing by Purpose

Sanity Testing

What is Sanity Testing?

Sanity testing is a narrow, focused check performed after receiving a minor code change or bug fix, to confirm that the specific functionality works as expected without doing a full regression pass.

Key Characteristics

  • Performed without formal test scripts, often on an ad-hoc basis.
  • Narrow in scope, focused only on the area affected by the change.
  • Usually done when time is limited and a full regression isn't feasible.

Smoke vs Sanity Testing

  • Smoke testing is broad but shallow, covering the whole application at a high level.
  • Sanity testing is narrow but deep, focused on one specific area after a change.

How a Sanity Check Runs, Step by Step

Even though sanity testing is informal, experienced testers follow a repeatable rhythm so nothing important slips through.

  1. Read the change note. Look at the bug ticket, release note or commit message to understand exactly what was fixed or added.
  2. Confirm the build. Check the version number on the test environment so you are not testing an older deployment.
  3. Verify the fix itself. Repeat the original failing steps and confirm the expected result now appears.
  4. Probe the close neighbours. Try the screens, fields and flows that share code or data with the change.
  5. Decide go or no-go. If the area behaves correctly, the build moves on to deeper testing or release. If not, it is rejected immediately with notes.

A good sanity pass is short. If it starts turning into a long session covering many unrelated modules, you have drifted into regression testing.

A Worked Example From an Online Store

Imagine a bug report: "Applying coupon SAVE10 shows the discount, but the order total does not change." The developer fixes the calculation and deploys a new build. Here is how a tester would sanity check it:

  • Add one product to the cart, apply SAVE10 and confirm the total drops by the correct amount.
  • Remove the coupon and confirm the original total returns.
  • Try an expired or invalid code and check that a clear error appears.
  • Proceed to the payment page and confirm the discounted amount is carried through.

The tester does not re-test login, search, product reviews or the admin panel. Those areas were not touched, and they will be covered later by the regression suite if the release calls for it.

Sanity, Smoke, Retesting and Regression Compared

TypeQuestion it answersScopeScripted?
SmokeIs this build stable enough to test at all?Whole app, shallowUsually yes
SanityDoes the changed area behave sensibly?One area, deeperUsually no
RetestingIs this specific defect really fixed?The failed test caseYes, the original case
RegressionDid the change break anything else?WideYes, often automated

Sanity testing often includes retesting of the fixed defect, plus a little exploration around it. Many teams treat sanity as a subset of regression that is chosen on the spot.

Common Mistakes and a Practical Checklist

  • Treating a pass as full sign-off. A sanity check says the change looks right, not that the whole release is safe.
  • Not writing anything down. Unscripted does not mean unrecorded. Note the build number, what you checked and the result.
  • Ignoring shared data. A fix to a tax rule may affect invoices and reports, not only the checkout page.
  • Testing on the wrong environment. Always confirm the deployment before starting.

Checklist for your next sanity pass: build version confirmed, original defect steps repeated, two or three related flows exercised, one negative case tried, outcome recorded in the ticket, and a clear go or no-go message sent to the team.

Ready to master real-world software testing?

Learn manual and automation testing hands-on with mentor-led sessions.

Explore Course