QAM Hub QAM Hub
Home / Glossary / Sanity testing

Sanity testing

Last reviewed

A narrow check that one specific fix or change behaves as expected, usually run after a build is already known to be broadly stable. Sanity testing is deep and narrow where smoke testing is shallow and wide. The two get used interchangeably in conversation, which is harmless until someone reports "sanity passed" and the other person hears full coverage.

When it is the right check

A fix lands for a reported bug, or a small change goes into an area with known risk. Running the full regression suite is too slow and running nothing is too trusting. A sanity check exercises the changed behaviour and the few paths right around it: the bug's reproduction steps, the obvious variations, the screen next door that shares the same code.

Sanity versus smoke

Smoke testing asks whether the whole build is alive. Sanity testing asks whether one thing in it is right. Smoke is usually scripted and repeated on every build; sanity is often unscripted and specific to the change, which is why it rarely has a permanent suite of its own.

Sanity versus retest

A retest re-runs the exact case that failed. A sanity check goes slightly wider, to catch the fix that solved the reported symptom and broke its neighbour. In practice a good sanity pass includes the retest and a handful of cases around it.

Record what was actually checked

"Sanity passed" in a status update is where trouble starts, because the reader often hears "tested". Record the scope: which cases, which build, which environment. If the check was exploratory, a short note with what was tried is enough, and it is much more useful a week later than a green status with no context.

In QAM Hub

Sanity passes are usually small runs created from a few selected cases, with Retest marking cases that have to be executed again after a fix. The statuses are described in execution statuses explained.

Back to the test management glossary