Difference between Smoke and Sanity Testing

Smoke Testing

  1. Smoke testing term came from hardware testing, when you get new hardware and power it on if smoke comes out then you do not proceed with testing.
  2. Smoke testing is done to check the normal health of the build and make sure if it is possible to continue testing. It is done in the beginning of the software testing cycle.
  3. A subset of most basic and important test cases is selected and run to make sure that most basic and crucial functions of the software are working fine.
  4. It follows shallow and wide approach where you cover all the basic functionality of the software.
  5. Smoke test is scripted, i.e you have either manual test cases or automated scripts for it.
  6. In some organizations smoke testing is also known as Build Verification Test(BVT) as this ensures that the new build is not broken before starting the actual testing phase.

Some basic test cases for Smoke Testing:

  • Can you install the software successfully.
  • Does software launches successfully after installation.

Sanity Testing

  1. When there are some minor issues with software and a new build is obtained after fixing the issues then instead of doing complete regression testing a sanity is performed on that build. You can say that sanity testing is a subset of regression testing.
  2. Sanity testing is done after thorough regression testing is over, it is done to make sure that any defect fixes or changes after regression testing does not break the core functionality of the product. It is done towards the end of the product release phase.
  3. Sanity testing follows narrow and deep approach with detailed testing of some limited features.
  4. Sanity testing is like doing some specialized testing which is used to find problems in particular functionality.
  5. Sanity testing is done with an intent to verify that end user requirements are met on not.
  6. Sanity tests are mostly non scripted.