Smoke Testing vs Sanity Testing- What’s the Difference ?

Smoke and Sanity testing

When a question arises about the difference between smoke and sanity. Some say ‘Both are same’, and some ‘slightly similar’ and Others say ‘ They are Different’. So, how do we decide ? Well, we will know in this post.

Smoke Testing :

Smoke testing is an end to end testing performed on the build to determine the stability. It is done by testing the crucial functionality of the application.

Build : Its the application that is deployed for the QA to test .

Purpose :

The purpose of smoke testing is to determine that the build is stable or not . If the build is stable, then the testing team proceeds for further testing. Which means the build is accepted by testing team. If its not, then the build is rejected and sent back for the fixes.

Who does ?

It depends, The Development team does smoke tests before deploying the build to make sure the build is good. On the other hand, QA team performs basic tests before starting the detailed testing.

Why Smoke ?

Smoke testing is done to ensure that, the crucial functions of the program are working as expected , and not concerned about the inner details. This is because, if the major functionality does not work, then there is no point in testing the other details.

Smoke Testing in software testing

Example :

If your are given a G-Mail application to test, what are the important functions ? Login to gmail, compose mail and send. Correct ? yeah! So, for instance if there is an error in sending an email , Does it make sense to test ‘Sent Mail’ , ‘Drafts’ , ‘Folders’ etc ? No, which means you are rejecting the build without further testing.

Smoke Testing performed on particular build is also known as ‘Build Verification Test’. The main focus is to test the critical areas and not finer details.

Sanity Testing:

Sanity testing is done to check whether the newly added functionality/ bug fixes are working as expected or not.

If sanity test cases are failed then there is not point in testing further as the required features or functionality is not available.

Example :

let us consider that , Gmail has added a new feature called ‘Auto acknowledgement’ which sends an return email that the email sent is delivered successfully. Now this is a new feature to be tested and we already have a build that is stable. So, testing the new feature is called sanity testing.

Smoke vs Sanity Testing

Similarities :

Sanity testing is related to smoke testing , We will look at the similarities below.

  1. Both smoke and sanity are used as criteria for accepting or rejecting a build. Smoke is done to check the crucial functionality. whereas, sanity to check the new functionality.
  2. Smoke is performed on relatively unstable product (initial builds) while sanity is done on stable builds.
  3. Once the build passes smoke, the next step would be Functional testing and then regression testing.
  4. For Sanity, if a new functionality is added then Functional testing and regression. If there is a bug fix its retesting and regression.

Note : Generally, only one of them is performed . But, if both are required then, Smoke testing is done at first and sanity next.

Importance of Smoke and Sanity Testing :

Consider an application which has 20 pages to be tested, if you do not perform the initial tests (smoke or sanity  as per the build ) and start testing the details. what happens if there is critical bug in the 19th page which has an impact on other pages as well ? It’s a waste of time and effort which obviously effects the timelines and output.

Hence these are must in order to :

  • Save Time and effort
  • Save Cost
  • Quality improvement

Hence, The final conclusion is that , Smoke and Sanity testing have similarities but they are different. That’s It.

Reference :
International Journal of Scientific and Research Publications- Smoke testing