Sanity testing is usually performed when any minor bug is fixed or when there is a small change in the functionality. It is a kind of software testing which is done by the testers to ensure that the functionality is working as expected.
Sanity testing is narrow and deep. Unlike Smoke testing, Sanity testing is focused on one or two functionalities whereas smoke testing is done to ensure that all the major features of the project is working fine.
After the changes or fixes are done in the code the software build is available to the testers. Post installation of the build the testers will do the Sanity testing of the changed functionality instead of doing the entire regression testing which will take more time.
If the bug fixes and the changed functionalities are not working as expected then the testers should not accept the build. This failure is caught early in the stage because of the sanity testing.
Few points about Sanity testing:
- It is a surface level testing which follows narrow and deep approach concentrating on the detailed testing of some limited features
- In sanity testing the testers verifies the commands and functions and all the menus in the product
- It is a subset of regression testing
- It is performed when we do not have enough time for detailed testing
- Sanity testing is usually not scripted
- Sanity testing is brief or quick testing in order to ensure that the changes are working as expected and as per the specification documents
- Sanity testing checks the minor bug fixes and the functionality changes are working at the same time it also ensures that the related functionality is intact.
Advantages of Sanity testing:
- It saves lots of time and effort because Sanity testing is focused on one or few areas of functionality
- There is no effort put in towards it’s documentation because it’s usually unscripted
- It helps in identifying the dependent missing objects.
- It is used to verify that a small functionality of the application is still working fine after a minor change.
Disadvantages of Sanity testing:
- Sanity testing focuses only on the commands and functions of the software
- It does not go to the design structure level so it’s very difficult for the developers to understand as how to fix the issues found during the sanity testing
- In sanity testing the testing is performed only for some limited features so if there is any issue in other functionalities then it will be difficult to catch them
- Sanity testing is usually unscripted so future references are not available
Difference between Smoke testing and Sanity testing:
Smoke testing | Sanity testing |
The main objective of Smoke testing is to verify the stability of the entire system | The main objective of Sanity testing is to verify the rationality of the system |
Smoke testing is executed to ensure that the basic functionalities are working as expected | Sanity testing is executed to verify that the new functionality or the bug fixes are working as expected |
Smoke testing is wide and shallow approach | Sanity testing is narrow and deep approach |
Smoke testing is usually scripted or documented | Sanity testing is usually unscripted |
Smoke testing is performed by the testers and it can also be performed by the developers | Sanity testing is usually performed by the testers |
Smoke testing is like general health checkup of the software | Sanity testing is like a specialized health check up of the software |
Smoke testing is performed earlier | Whereas sanity testing is performed after the Smoke testing |
Other popular articles:
- What is smoke testing? When to use it? Advantages and Disadvantages
- What is Retesting? When to use it? Advantages and Disadvantages
- What is Integration testing? Examples, How To Do, Types/Approaches, Differences
- Difference between regression testing and retesting
- What is Software Quality?
kushan says
What should be done after a bug is found
Mohammed K Ahsan says
Very good book on QA Testing.
Ivor says
There are times when I wonder if we in the testing profession sometimes invent a new term (here, sanity testing) just for the sake of it. Not because it is necessary.
In over twenty years as a test manager, I have become a staunch supporter of a strong release management process where smoke testing and regression testing are key components. If my clients do not see a need for microscopic refinement of an already well-defined area of testing then neither do I.
Indeed, one might be forgiven for wondering if this is just an excuse for large consultancies to spend lots of extra time reorganising existing test activity to justify charging their clients more.
Since the perceived difference between smoke testing and sanity testing is so tiny, maybe the more interesting question is which one of these terms you would choose to describe the same base.
Votes?
vic says
At Few points about Sanity testing it states “It is a subset of regression testing”
At Difference between Smoke testing and Sanity testing it states ” It is a subset of Acceptance testing ”
Make up your mind. Sanity is on Acceptance and not Regression
ISTQB Guide says
Thank you for pointing out the error. Sanity testing is a subset of regression testing.
sameer khan says
in above few points, its s written that sanity testing is a subset of regression testing. But in difference column its given in sanity testing column that, its a subset of acceptance testing. May be its misplaced with smoke testing. Please do check and reply or modify if mistaken.
thanks in advance
ISTQB Guide says
Sanity testing is a subset of regression testing. We have corrected the error.
Vijal says
Good one… Thanks!