Smoke Testing and Sanity Testing are one of the most confused 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.
Table of Contents
- Smoke Testing
- Sanity Testing
- Differences between Smoke Testing vs. Sanity Testing
Smoke Testing is a type of testing that determines whether the deployed build is stable or not.
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”.
- 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.
Let’s take a simple example of a Gmail application for testing.
Here the important functions are:
- Login to Gmail application
- Compose an email
- 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 is a subset of Regression Testing which is performed to ensure that the code changes that are made are working properly.
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 the defect/bug is fixed.
- When tester receives software build with minor changes in code.
Let’s take an example of OLA application for Testing.
Here the features are:
- Signup to OLA app
- Login to app
- Search Cab
- 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.
|Category||Smoke Testing||Sanity Testing|
|What||Smoke testing exercises the entire system from end to end||Sanity testing exercises only the particular component of the entire system|
|When||Smoke Testing is performed to make sure that critical functionalities of the application are working fine||Sanity Testing is performed to check that new functionalities /bugs have been fixed|
|Why||The objective of the testing is to verify the stability of the system in order to proceed with more rigorous testing||The objective of the testing is to verify the rationality of the system in order to proceed with more rigorous testing|
|Scripted||Smoke testing is usually documented and scripted||Sanity testing is not documented and unscripted|
|Subset||Smoke testing is a subset of Acceptance Testing||Sanity testing is a subset of Regression testing|
|Analogy||Smoke testing is like General Health check-up||Sanity testing is like Specialized Health check-up|
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.
- Sanity testing is also called tester acceptance testing.
- Smoke testing performed on a particular build is also known as a build verification test.
- Both smoke and sanity tests can be executed manually or using an automation testing tool.
- When automated tools are used, the tests are often initiated by the same process that generates the build itself.
- As per the needs of testing, you may have to execute both Sanity and Smoke Tests in the software build. In such cases, you will first execute Smoke tests and then go ahead with Sanity Testing. In our industry, test cases for Sanity Testing are commonly combined with that for Smoke Testing, to speed up test execution.
Happy Testing! 🤩