World’s largest virtual agentic engineering & quality conference
Learn what sanity testing is in software testing, with examples, entry and exit criteria, a reusable checklist, and how to automate sanity checks in CI/CD.

Nazneen Ahmad
Author

Shahzeb Hoda
Reviewer
Last Updated on: August 4, 2026
On This Page
Sanity testing is a narrow, unscripted subset of regression testing that verifies whether a specific change, bug fix, or new feature works correctly in a new build.
It checks only the modified modules and their direct dependencies, answering one question in minutes: is this build stable enough to spend full regression time on?
In software testing, that gate matters because every build carries the risk of breaking something that worked yesterday.
Running a sanity test first means a broken build is rejected in minutes, rather than after hours of regression effort.
This guide covers what sanity testing is, when and how to run it, its entry and exit criteria, a reusable checklist, how it differs from smoke and regression testing, and CI/CD automation.
Overview
Who Performs Sanity Testing
Sanity testing sits mainly with QA. Developers often check their own fix first, but the formal verdict belongs to someone other than the author.
How Long Should a Sanity Test Take
Typically 30 to 60 minutes manually, or minutes once automated. If it stretches across a day, the scope has drifted into regression and needs cutting back.
Sanity testing is a narrow subset of regression testing that verifies a specific change or bug fix works correctly in a new build. It checks only the modified modules and their direct dependencies.

Put another way, it is a fast and targeted quality check that verifies only the areas a change actually touched. Six traits define what that looks like in practice:
Worth knowing before you use the term in a test plan: the distinction drawn above is an industry convention, not a standards definition.
The ISTQB glossary has no separate entry for sanity testing. It lists "sanity test" as a synonym of smoke test, alongside "confidence test" and "intake test".
That single term is defined as "a test suite that covers the main functionality of a component or system to determine whether it works properly before planned testing begins."
In everyday practice, though, most QA teams do separate the two: smoke first and wide, sanity second and narrow. Both usages are defensible, which is precisely the problem.
I have sat in a release review where the QA lead and the delivery manager each said "sanity passed" and meant different checks. It cost the team a day.
Define which one your team means in the test plan rather than assume it is shared. The comparison table below reflects common industry usage, not the ISTQB synonym.
Sanity testing matters because it decides whether a build deserves further testing effort at all. Catching a broken fix early stops a bad build from consuming a full regression cycle.
Skipping it is a false economy, and these are the six reasons why:
All of that value depends on keeping the check deliberately narrow. Two priorities govern which test cases make the cut:
A sanity test is recognisable by how narrow and informal it is. Those traits are what keep the exercise short, and what stop it quietly expanding into an unplanned full regression run.

These seven traits set it apart from every other check in the pipeline:
To practically implement the features mentioned above, sanity tests are required in various test environments to ensure the software application functions correctly.
Within its narrow scope, a sanity test is not limited to clicking through a feature. These are the aspects it verifies on the modules touched by the change:
Run a sanity test whenever a change lands rather than on a predetermined schedule. Any build carrying a bug fix, a minor edit, or a new feature earns one before it progresses further.
Six situations should prompt a sanity test:
Frequency is driven by change, not by the calendar. The rule is simple: run a sanity test once per changed build.
If three hotfixes land in a day, that is three sanity tests, each scoped only to what its own fix touched.
Early in development, when code churn is high and builds are unstable, this means running it several times a day. As the application stabilises and changes become rarer, the cadence naturally drops.
Three factors set the frequency in practice: how often the build changes, how critical the modified module is, and how close the release date is.
The shortcut I settled on is to ask what breaks if this specific change is wrong. A payment hotfix a week before release warrants one on every rebuild; a static copy edit does not.
Sanity testing sits in the testing phase of the Software Development Life Cycle, immediately after a build is deployed.
Within that phase it is a form of functional testing, executed once minor changes or bug fixes reach the build.

It runs after unit, integration, and system testing have established a baseline, and after the smoke test has confirmed the build launches at all.
Its job at that point is narrow: validate that the latest changes or fixes introduced no new defects.
Once the sanity test passes, the build moves on to the full regression suite and then to acceptance testing, where the end user verifies it against the Software Requirement Specification (SRS).
Performing a sanity test means scoping the change, checking it against the requirement, then testing the affected area in depth. The same sequence applies whether you run it manually or automated.

The process breaks into three steps:
Those three steps can be executed two ways, by hand or through an automated suite. Which one you choose depends on how often the build changes and how large the affected area is.
The manual route borrows directly from manual testing practice.
Each approach has its own trade-offs, so it is worth looking at both in turn.
In manual sanity testing, critical test cases are executed to validate the software’s stability and functionality. Such an approach is helpful in case of limited resources and time for testing, and changes done are minor.
A manual run breaks down into five steps:
Manual runs lean heavily on the tester's judgement, since there is no script to fall back on.
The software testing skills that matter most are product knowledge and knowing which dependencies a change is likely to touch.
Automated sanity tests use automated testing tools and frameworks to verify the application's basic functions.
That means building test cases which run on their own every time a new build or release is produced.
Automation earns its place on complex applications where the same critical paths need re-checking on every build.
One caveat worth stating plainly, because plenty of guides get it backwards: sanity tests are more often run manually than automated.
The check is narrow, unscripted, and usually needed once, so scripting it for a one-off hotfix costs more than simply executing it.
Automation pays off only when the same validations repeat, which is exactly the CI/CD case covered further down.
An automated run adds setup and reporting around the same core, which works out to eight steps:
Note: An automated sanity suite is only as trustworthy as the environments it runs on. TestMu AI executes the same suite across 10,000+ browser and OS combinations in parallel, so a pass means the fix holds everywhere your users are. Try TestMu AI free!
Entry criteria confirm the build deployed cleanly, smoke passed, and the change is documented. Exit criteria are binary: a pass sends the build to regression, a fail rejects it to development.
All four of these must hold before the sanity test begins:
Exit criteria (any one ends the sanity test):
A sanity test case stays deliberately lightweight, because the check is unscripted and often needed only once. A short fixed structure is what keeps it consistent from one tester to the next.
Five fields are enough, and the structure below is the one covered in how to write test cases, stripped down:
Keeping that to five fields is deliberate. Every extra field I have seen added to a sanity template got skipped within two sprints.
The checklist below is its companion, run against every changed build:
Sanity testing quickly evaluates the quality of a changed build and decides whether deeper testing is worth running. Two concrete scenarios show exactly what a sanity test does and does not cover:
Both examples follow the same pattern: verify the fix itself, verify its immediate neighbours, and stop.
A sanity test only checks the modified components and their direct dependencies. It does not check end-to-end functions.

Smoke asks whether the build runs, sanity asks whether the change worked, and regression asks whether anything else broke. The three run in that sequence, and each one gates the next.
The table below sets the three side by side across the factors that actually change how you run them within the Software Testing Life Cycle.
| Factor | Smoke testing | Sanity testing | Regression testing |
|---|---|---|---|
| Purpose | Confirm the build launches and its core paths respond at all. | Confirm a specific change or bug fix works as intended. | Confirm the whole application still works after changes. |
| Scope | Wide but shallow: the critical end-to-end paths. | Narrow and deep: only the modified modules and their direct dependencies. | Broad and deep: the full maintained suite across the application. |
| When it runs | First, immediately on receiving a new build. | After smoke passes, on every changed build, bug fix, or hotfix. | After sanity passes, before releases and major cycles. |
| Part of which test | Subset of acceptance testing. | Subset of regression testing. | A test level in its own right. |
| Who executes | Developers or testers. | Mainly testers. | Testers, usually via an automated suite. |
| Documentation | Usually scripted and documented. | Usually unscripted and undocumented. | Fully scripted and maintained. |
| Execution time | Minutes. | Minutes. | Hours, often parallelised to compress. |
| Outcome | Build accepted for testing, or rejected outright. | Gate decision: proceed to regression, or reject the build. | Release decision: ship or fix. |
These three run as a sequence, not alternatives. Smoke asks "does this build run?", sanity asks "did this change work?", and regression asks "did anything else break?"
A failed sanity test rejects the build before any regression time is spent, and a passed one is the entry ticket to the regression suite.
Which check should you run? Use this decision flow on any new build:
For a deeper treatment of either pairing, see Smoke Testing vs Sanity Testing and Sanity Testing vs Regression Testing.
Running sanity tests through automated test tools lowers the load on testers and shortens release time.
Here are some popular automation testing tools used to perform sanity tests:
The list of sanity testing tools above is just a few examples of many other options in automation tools. You should evaluate different options based on the specific needs of the applications.
If the change you are verifying sits in a mobile app rather than a web app, the equivalent sanity suite runs through Appium mobile testing on cloud instead.
Automation tools carry limitations that create hurdles of their own. Their scope is bounded by whatever they were programmed to check.
Maintenance overhead and licensing cost are the other two, and together they push most teams to look for alternatives.
This is why sanity suites are usually run on a cloud platform rather than local machines.
Cloud-based platforms like TestMu AI remove the grid maintenance overhead and run the suite in parallel, which is what keeps a sanity gate down to minutes.
The two sections that follow cover exactly that: first how to wire the suite into a CI/CD pipeline, then how to run it on the cloud, as set out in this cloud testing tutorial.
Run the sanity suite as an automated quality gate inside the pipeline. It triggers on deploy to the test environment, blocks promotion on failure, and queues regression on success.
The pattern looks the same in Jenkins, GitHub Actions, or any CI tool:
Keep the gate fast by running the sanity suite on a cloud grid in parallel, rather than sequentially on the CI runner.
For Jenkins, routing tests to the cloud is covered in the Jenkins pipeline integration docs. The same suite definition then serves every hotfix.
Note: A sanity gate only survives if it finishes fast, otherwise teams quietly skip it. HyperExecute runs the suite as one gated step and returns a single pass or fail exit code your CI can branch on. Start Testing Now!
Cloud platforms run sanity tests on real browsers and devices with no local grid to maintain. That removes the infrastructure cost and executes the suite in parallel, keeping the gate to minutes.
Platforms such as TestMu AI let you run manual and automated web and mobile app testing across 10,000+ browsers, devices, and operating systems.
With it you can automate your test suites using frameworks such as Selenium, Cypress, Playwright, Appium, Espresso, and XCUITest.
Follow the below-given steps to conduct a sanity test using TestMu AI.
You can execute web and mobile application tests through the Real Time Testing feature of TestMu AI.
Follow the steps below, or see the desktop browser real time testing documentation for the full configuration reference.
Here is how you perform real-time testing for your website or web application:


A cloud-based machine will be launched running real browsers and operating systems where you can perform sanity tests while leveraging features like one-click bug logging, video recording, capturing screenshots, etc.

Similarly, you can test mobile web and native applications on Android emulator online, iOS simulator online, and real device browser testing documentation.
TestMu AI gives access to 10,000+ desktop and mobile browser environments to run automated tests using different best test automation frameworks. To perform an automated sanity test, you can follow these steps.




On a similar note, you also perform app test automation using frameworks like Appium, Espresso, and XCUITest.
Watch the below to learn more about performing app automation using TestMu AI.
You can also subscribe to the TestMu AI YouTube Channel for tutorials on Selenium, Cypress, and more.
When the sanity suite outgrows a local grid, it can run at scale on the Selenium automation platform.
The speed that makes a sanity test useful is exactly what limits it. Its constraints are structural rather than fixable, so each one needs a deliberate counter-practice built into how you run it.
Four constraints come with the technique, and each has a practical counter:
Beyond the per-challenge fixes above, three habits keep the technique honest:
Seven practices separate a sanity test that protects a release from one that just adds a step to the pipeline:
It remains the dominant industry term, though plenty of teams now prefer a neutral alternative such as confidence check, because sanity frames correctness in mental-health language.
Common replacements, all describing exactly the same quick verification:
Is it okay to still say "sanity check"? It remains the dominant industry term and appears throughout tooling and documentation, so you will keep encountering it.
If your team or client prefers inclusive language, "confidence check" carries the same intent, and nothing about how the test is performed changes.
Sanity testing earns its place for one reason: it is the cheapest point in the pipeline at which you can reject a bad build.
A few minutes confirming a hotfix worked, and did not break its neighbours, saves hours of regression on a build that was never going to ship.
If you take one thing from this guide, make it the sequence: smoke asks whether the build runs, sanity asks whether the change worked, regression asks whether anything else broke.
They are not competing options. Skipping the middle one turns a ten-minute rejection into a half-day investigation.
The practical starting point is small: write the five-part test case, keep the checklist to one screen, and agree entry and exit criteria with your team.
Wire the repeatable parts into CI so the gate runs itself. Get that much in place and the rest of the technique follows.
Author
Nazneen Ahmad is a freelance Technical Content SEO Writer with over 6 years of experience in crafting high ranking content on software testing, web development, and medical case studies. She has written 60+ technical blogs, including 50+ top-ranking articles focused on software testing and web development. Certified in Automation Basic and Advanced Training - XO 10, she blends subject knowledge with SEO strategies to create user focused, authoritative content. Over time, she has shifted from quick, keyword-heavy drafts to producing content that prioritizes user intent, readability, and topical authority to deliver lasting value.
Reviewer
Shahzeb Hoda is the Associate Director of Marketing and a Community Contributor at TestMu AI, leading strategic initiatives in developer marketing, content, and community growth. With 10+ years of experience in quality engineering, software testing, automation testing, and e-learning, he has authored and reviewed 70+ technical articles on software testing and automation. Shahzeb holds an M.Tech in Computer Science from BIT, Mesra, and is certified in Selenium, Cypress, Playwright, Appium, and KaneAI. He brings deep expertise in CI/CD pipeline automation, cross-browser testing, AI-driven testing practices, and framework documentation. On LinkedIn, he is followed by 3,700+ engineers, developers, DevOps professionals, tech leaders, and enthusiasts.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance