Smoke testing essentially checks for the stability of a software build. It can be deemed as a preliminary check before the build goes for testing.
Sanity testing is performed after a stable build is received and testing has been performed. It can be deemed as a post-build check, to make sure that all bugs have been fixed. It also makes sure that all functionalities are working as per the expectations.
Let us first take a quick look at the details of both types of testing, and then we can move onto identifying the differences between them. There is a thin line between them, and people tend to confuse one for another.
What is smoke testing?
Smoke testing, also known as build verification testing, is performed on initial builds before they are released for extensive testing. The idea is to net issues, if any, in the preliminary stages so that the QA team gets a stable build for testing, thus saving a significant amount of effort and time spent by the QA.
Smoke testing is non-exhaustive and focuses on testing the workflow of the software by testing its critical functionalities. The test cases for smoke testing can be picked up from an existing set of test cases. The build is marked rejected in case it fails the smoke tests.
Note that, it is just a check measure in the testing process, and in no way, it replaces comprehensive testing.
Smoke tests can be either manual or automated.
What is sanity testing?
Sanity testing is performed on a stable build which represents minor changes in code/functionality to ensure that none of the existing functionality is broken due to the changes. For this, a subset of regression tests is conducted on the build.
It is performed to verify the correctness of the application, in light of the changes made. Random inputs and tests are done to check the functioning of software with a prime focus on the changes made.
Once the build successfully passes the sanity test, it is then subjected to further testing.
Sanity tests can be either manual or automated. To know more about this blog click on this link