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.
Table of Contents
- Smoke Testing
- Sanity Testing
- Differences between Smoke Testing vs. Sanity Testing
- Key Points
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:
- 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.
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:
- 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.
Differences between Smoke Testing vs. Sanity Testing
|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.
When do you do sanity and smoke testing?
Smoke testing is done at the initial stages of SDLC (Software Development Life Cycle) to find the core functionalities of an application, whereas a sanity test is performed at the final stage after completing the smoke testing.
Why is sanity testing performed?
Sanity testing is performed to check whether the code changes are working properly or not. The general focus of sanity testing is to validate the high-level functionalities and not to perform all features of the application.
Which comes first, smoke or sanity?
Smoke testing is performed first followed by sanity testing. Smoke tests are done at the early stages of SDLC, testing the basic functionalities of the software, and sanity tests are done at the final stages of SDLC to test the high-level functionalities of the software.
Is sanity and smoke tests the same?
Sanity and smoke tests employ different concepts
- Smoke testing is a kind of Software Testing performed to test the critical functionalities of the program. It is executed before functional or regression tests are executed on the build. The purpose of a smoke test is to reject a badly broken application so that the QA team does not waste time in development on something that is not yet functional.
- Sanity testing is performed after receiving a software build with minor changes in the code. If the sanity testing is failed, the build gets rejected in order to save the time of the QA team members.
- 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.
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! 🤩