Smoke Testing vs. Sanity Testing — What, Why & When

Sri Priya P Kulkarni
4 min readOct 20, 2023

--

This blog was originally published on the TestProject website. Link to the original post- https://blog.testproject.io/2020/05/31/smoke-testing-vs-sanity-testing/

Smoke Testing and Sanity Testing are one of the most confusing testing terminologies by QA teams. In order to understand the basics between these two testing types, their differences and during which testing stage each should be performed — One first needs to understand “What is Build?” 🔍

Build is a software or an application ready for testing. It is something that has a working piece of code that needs to be tested.

Smoke Testing

What is Smoke Testing?

Smoke Testing is a type of testing that determines whether the deployed build is stable or not.

Why Perform Smoke Testing?

The purpose of Smoke Testing is to confirm whether the QA team can proceed with further testing. It is also called as “Build Verification Testing” or “Confidence Testing”.

When to Perform Smoke Testing?

  • Whenever the Dev team provides a fresh build to the QA team. Fresh Build=Build has new changes made by the developer.
  • When a new module/functionality is added.

Pros of Smoke Testing

  • Smoke testing helps to find bugs in the early stages of testing.
  • It improves the quality of risks and reduces the risks.
  • Smoke testing can be completed in a short span of time and quickly.
  • It helps in checking that the issues fixed in the previous build are NOT affecting the major functionalities of the application.
  • Smoke testing does not require more test cases.

Cons of Smoke Testing

  • The smoke tests do not cover all functionalities of the application.
  • Smoke tests are non-exhaustive testing with fewer test cases; they cannot identify the critical bugs and performance issues in the application.
  • Smoke tests don’t perform negative scenarios and with invalid data.

Smoke Testing Example

Let’s take a simple example of a Gmail application for testing.

Here the important functions are:

  1. Login to Gmail application
  2. Compose an email
  3. Send the email

Why are the above functionalities important when it comes to Smoke Testing?

Assume your email does not get sent… Does it make any sense to test other functionalities such as: Drafts, Deleted messages, Archives, etc? 🤔 No. If even the basic functionality of sending an email is not working, then this means there is no use of testing any further functionalities.

The main focus of Smoke Testing is to test the critical areas & not the whole application.

Sanity Testing

What is Sanity Testing?

Sanity Testing is a subset of Regression Testing which is performed to ensure that the code changes that are made are working properly.

Why Perform Sanity Testing?

The purpose of Sanity Testing is to determine that the changes in functionality and bug fixes are working as expected. It is also called as “Tester Acceptance Testing”.

When to Perform Sanity Testing?

  • When the defect/bug is fixed.
  • When tester receives software build with minor changes in code.

Pros of Sanity Testing

  • Sanity testing helps in identifying the issues quickly and reporting the issues immediately.
  • No documentation is required as the test cases are carried out in a lesser time when compared to other test types.
  • If any defects are found during smoke testing, the build gets rejected, saving time and effort.
  • The execution of sanity testing will help in saving unnecessary testing effort and time because it is only focused on one or a few functionality areas.

Cons of Sanity Testing

  • Sanity testing focuses only on the commands and functions of the application.
  • Sanity tests focus only on the limited features so it is difficult to identify major bugs during sanity testing.
  • As the sanity tests are unscripted, future references are not available.
  • All test cases are not covered under sanity tests.

Sanity Testing Example

Let’s take an example of OLA application for Testing.

Here the features are:

  1. Signup to OLA app
  2. Login to app
  3. Search Cab
  4. Book Cab

Assume these four features are tested and “Login” feature is not working. Then the developer modifies & fixes the defects. Then, Sanity Testing will be performed only on the modified function.

Differences between Smoke Testing vs. Sanity Testing

Both smoke testing and sanity testing are performed to avoid wasting time and effort by quickly determining whether an application is too flawed to merit any rigorous testing.

Conclusion

Smoke and Sanity testing are significant in the development of a project. A smoke test is used to confirm whether the basic functionalities of a particular build are working fine or not. Sanity testing is to check if the build is good to go to further testing stages.

The common thing among both Sanity and Smoke tests is that they are employed to avoid wasting time and effort by quickly checking whether or not an application is fit for more rigorous testing.

Happy Testing! 🤩

--

--

Sri Priya P Kulkarni

SDET| Blogger! | Automation Enthusiast! | On a journey of Continuous learning.... !