What is Smoke Testing And Sanity Testing? Smoke Testing Vs Sanity Testing with Examples
In this article, we see what is Smoke Testing and Sanity Testing and also the difference between Smoke and Sanity Testing. Both smoke tests and sanity tests have their own objectives and priorities. These two types of testing play a key role in the success of a project.
Smoke and Sanity Testing come into the picture after build release. There is chaos in novice testers when it comes to the difference between smoke and sanity testing. Here in this article, let’s see what Smoke and Sanity Testing are and the difference between Smoke and Sanity Testing in detail with practical examples to understand easily. Hopefully, by the end of this article, you will get a clear idea of Sanity and Smoke Testing.
Check the below video to see “Smoke Testing Vs Sanity Testing”
Please be patient. The video will load in some time.
If you liked this video, then please subscribe to our YouTube Channel for more video tutorials.
What is Smoke Testing in Software Testing?
Smoke Testing is done to make sure if the build we received from the development team is testable or not. It is also called as “Day 0” check. It is done at the “build level”.
Read more: Smoke Testing Detailed Guide
It helps not to waste the testing time to simply testing the whole application when the key features don’t work or the key bugs have not been fixed yet. Here our focus will be on primary and core application workflow.
How to Conduct Smoke Testing?
To conduct smoke testing, we don’t write test cases. We just pick the necessary test cases from already written test cases.
Do we really write test cases for all testing types? Here in this article, we have given a clear idea of choosing testing types to write test cases.
As mentioned earlier, here in Smoke Testing, our main focus will be on core application workflow. So we pick the test cases from our test suite which cover the major functionality of the application. In general, we pick a minimal number of test cases that won’t take more than half an hour to execute.
Real-Time Example: Assume, you are working for an eCommerce site. When a new build is released for testing, as a Software QA you have to make sure whether the core functionalities are working or not. So you try to access the eCommerce site and add an item into your cart to place an order. That’s a major workflow in most of the eCommerce sites. If this flow works, you can say this build is passed. You can move on to functional testing on the same build.
What is Sanity Testing in Software Testing?
Sanity Testing is done during the release phase to check for the main functionalities of the application without going deeper. It is also called as a subset of Regression testing. It is done at the “release level”.
Read more: Sanity Testing Detailed Guide
At times due to release time constraints rigorous regression testing can’t be done to the build, sanity testing does that part by checking main functionalities.
Most of the time, we don’t get enough time to complete the whole testing. Especially in Agile Methodology, we will get pressure from the Product owners to complete testing in a few hours or end of the day. In these scenarios, we choose Sanity Testing. Sanity Testing plays a key role in these kinds of situations.
Earlier I have posted a detailed post on “Difference between Regression and Retesting”. If you haven’t gone through it, you can browse by clicking on the link.
How to Conduct Sanity Testing?
Same as Smoke testing, we don’t write separate test cases for Sanity testing. We just pick the necessary test cases from already written test cases.
As mentioned earlier, it is a subset of regression testing. When it comes to Sanity testing, the main focus is to make sure whether the planned functionality is working as expected.
Real-Time Example: Let’s take the same example as above. Assume you are working on an eCommerce site. A new feature is released which is related to Search functionality. Here your main focus should be on the search functionality. Once you make sure that the Search functionality is working fine then you move on to other major functionality such as payment flow.
Sanity & Smoke Testing Process:
Smoke Testing is also known as Build Verification Testing
Sanity Testing is also known as Surface Level Testing
Smoke Testing Vs Sanity Testing
Example to showcase the difference between Smoke and Sanity Testing:
For example: In a project for the first release, the Development team releases the build for testing, and the test team tests the build. Testing the build for the very first time is to accept or reject the build. This we call it Smoke Testing. If the test team accepts the build then that particular build goes for further testing. Imagine the build has 3 modules namely Login, Admin, Employee. The test team tests the main functionalities of the application without going deeper. This we call it Sanity Testing.
Some more differences between Smoke Testing and Sanity Testing:
|SMOKE TESTING||SANITY TESTING|
|Smoke Test is done to make sure if the build we received from the development team is testable or not||Sanity Test is done during the release phase to check for the main functionalities of the application without going deeper|
|Smoke Testing is performed by both Developers and Testers||Sanity Testing is performed by Testers alone|
|Smoke Testing exercises the entire application from end to end||Sanity Testing exercises only the particular component of the entire application|
|Smoke Testing, build may be either stable or unstable||Sanity Testing, build is relatively stable|
|It is done on initial builds.||It is done on stable builds.|
|It is a part of basic testing.||It is a part of regression testing.|
|Usually it is done every time there is a new build release.||It is planned when there is no enough time to do in-depth testing.|
Do we automate smoke tests?
I have received many queries from my Facebook and Twitter followers on this.
Yes, we do automate Smoke test cases. It saves a lot of testing time. Assume you have 50-100 smoke test cases. To execute these 50-100 test cases, it may take time around 4-6 hours approximately. If you have automation scripts for these test cases, you can execute them once the build is released and confirm whether the build is passed or not in less than the time you spend on manually executing smoke test cases. So most of the teams automate smoke test cases.
- Testing Complete Tutorial
- 100+ Types of Testing Every Tester Should Know
- Manual Testing Interview Questions
- QA Interview Questions
who do the smoke testing tester or test lead and who has authority for accepting or rejecting build.
Hi Sachin, It depends completely on the team you work. In general, if you are a tester and found that the build is not stable while doing smoke test. You need to expedite it to your Team Lead. Necessary steps will be taken to reject the build by Test Lead.
In case of smoke testing, how do they decide the build is testable or not? I mean do they execute r just review or any other factors?
Hi Geetanjali, Once the build is released, testers do testing the build and report back if the build is not testable. Testers pick up some test cases to do smoke testing.
For not testable build, the reason is bug or many others?
Why we perform sanity testing & why it is required?
Hi Dibya, It is a subset of regression testing. Sanity testing aims to quickly evaluate if the new functionality, modification or bug fix is working without any issues in the existing functionality. To give you clear idea on regrssion testing. regression testing aims to evaluate if the older functionalities are still working or not after adding a new functionality, modification or bug fix in the application. Also, refer this link
How to pick testcase for smoke and sanity test?
Do we write separate testcase for smoke and sanity test?
Hi Priya, check this link.
please give me the real example of sanity and smoke testing.how we prepare the test case sheet to describe the bug report…what we will do if we testing any application..
Smoke: Whenever Development team releases a build, testers test that build to verify whether the software is ready for further testing. (This we do because there might be chances for build failure)
Sanity: If the test team accepts the build then they do further testing. Due to time constraints testers sometimes dont do regirous regression testing of all the modules in the software, testers test the main funcionalities of the application without going deeper.
Check out the below links:
Test Case template explanation in detail
Defect Report/Bug Report Detailed Explanation
How To write a good bug report
If you have any other queries, let me know. Thanks.
Thanku for the explain.
You are welcome Anjali. If you have any queries, you can ask us. Thanks.