At first, let’s make out what smoke and what sanity testing is.
Smoke testing is non-exhaustive software testing, checking out whether the most important functions of a program work, but ignoring finer details. It is kind of testing performed to make sure that the project done can be further tested more thoroughly. It is done, in most cases, to inspect the stability of the build made for software testing.
Sanity testing also called acceptance testing is used to assess if the supplied build can be tested or not, that is to say sanity testing is testing of an application to check whether it is stable enough for further testing. A subset of regression test cases are performed to check if the software bugs or other issues were repaired and no other software bug is present after the changes. Occasionally when repeated cycles of regression testing are performed, sanity testing can be shifted for further stage, when all regression test cycles are finished. If a build is moved from staging testing server to production server, sanity testing of the software application is performed to test whether the build is sane enough to proceed further with production server or not.
So, what is the difference between them?
While smoke testing is applied to all areas of testing the software application, not too deep, though, and is considered to be a wide approach, sanity testing is a narrow regression testing, focusing on one small set of functionality areas of the software application.
- Test cases for smoke testing are either manual or automated, but sanity testing is usually performed without any test scripts or cases.
- The main aim of the smoke testing is to make sure if the main functions of the software application are working or not. While performing this test, finer details are not interested to us. Yet sanity testing is a superficial software testing type. It is performed every time a quick round of testing can check that the software application is performing in accordance with functional or other requirements.
- Smoke testing of the software is performed to ensure if the build can be accepted for through software testing. However sanity testing is used to check if the requirements are met or not.