Smoke testing and sanity testing are the most misunderstood topics in Software Engineering. There is an enormous amount of information available on the internet related to the subject but most of them seem confusing. This article will help you in understanding the differences clearly and addresses your confusions directly. The major difference between both types of testing can be quickly understood by the diagram given below. To appreciate this diagram, let us first learn a few basic topics that include:
When you are developing a simple software program that consists of a few lines of source code, it is easy to compile and execute. But this is not the real situation in Companies. A typical Software program or application usually consists of 100 or even 1000s of source code files. Creating an executable program from huge source code files is a quite complicated and time-consuming process too. You need a build here to generate the executable program and this complete process is named as the “Software Build” in Software Engineering.
Smoke Testing is a special type of testing performed on Software build to check the critical functionalities of the program. It is done at the early stage before regression testing or any other detailed testing is performed on the software build. The purpose of smoke testing is to reject badly performing application so that the QA team does not have to waste time in the installation or testing of a software application.
In smoke testing, the test cases are chosen to define the most critical functions of the application or component of the system. The objective is clear here to verify the most critical functionalities of the system either they are working fine or not.
For example, a typical smoke test involves:
In brief, Smoke Testing makes sure that build is testable or not received from the development team. It is also named as the “Day 0” check and performed on the build level. It saves time as you don’t have to test the whole application if the core functionalities of the program are not working. So, the primary focus will be the core application workflow in case of the Smoke testing.
Sanity Testing is a special type of software testing performed after receiving a software build with little changes in code or functionality to ascertain that certain bugs have been fixed in advanced to resolve workflow issues. The goal of sanity testing is to determine that the proposed functionalities are working roughly as expected. If sanity testing fails then the build is rejected directly to save time and costs that are involved in more rigorous testing.
The objective of sanity testing is not to verify the core functionalities thoroughly bit to determine that the developer has applied some rationality while building a software program. For example, if your scientific calculator fives the result of 2+2=5! for the instance, then there is no need to check the advanced functionalities like trigonometry calculations or more.
Sanity testing is performed during the release phase to check the main functionalities of an application without going into depth. It is named as the subset of regression testing. There are certain cases when regression testing is not done to the build due to time constraints and sanity testing is considered more suitable to check the main functionalities.
To conduct the smoke testing, you done have to write any test cases. You just have to pick the necessary test cases that are already written or defined by programmers. For Smoke Testing, our main objective is to focus on the application workflow. So, we can pick test cases from the test suite that cover major functionalities of the software program. Generally, testers pick a few test cases only that won’t take more than one hour to execute. Let us understood the concept of Smoke Testing in little depth with the help of an example given below.
Assume you are working on an E-commerce project. When a new software build is released for the testing, a software quality engineer has to be sure that all core functionalities are working fine. in the case of an E-commerce site, try to add items in your cart to place an order. This is the major workflow for all E-commerce sites today. If items are added successfully and payment is done to the right merchant then you can say that build is passed. Now, you can move on to perform functional testing on the same build.
To conduct sanity testing, you don’t have to write any separate test case similar to smoke testing. You just have to pick the necessary test cases that are already written by programmers. Testers just have to make sure that the planned functionality is working as needed.
Let us discuss the above example again in reference to the Sanity Testing. Assume that you are working on an e-commerce site and a new feature is released related to Search functionality. So, your main focus is to check either Search function is working fine or not. Once it is tested well then move on to other major functionality like payment flow.
In any project during the first release, the development team asks testers to test the build completely. When the build is tested for acceptance or rejection, it is smoke testing. If the build is accepted and it is tested further for main functionalities then it is Sanity testing. For example, consider that the same build has three modules like Login, Logout, and Admin. You need to check these modules for their basic functions without going to deeper then it is Sanity Testing.
|Smoke Testing||Sanity Testing|
|Smoke testing ascertains that core functionalities of the program are working fine absolutely.||Sanity Testing is done to check either new functionalities or bugs have been fixed properly without going deeper.|
|The objective of smoke testing is to verify the stability of the system to process regression testing in the future.||The objective of sanity testing is to verify the rationality of the system to proceed with more regression testing in the future.|
|Smoke testing is performed either by developers or testers.||Sanity testing is performed by testers only.|
|Smoke Testing is usually documented and scripted.||Sanity testing is not documented or scripted.|
|Smoke testing is a subset of acceptance testing.||Smoke testing is a subset of regression testing.|
|Smoke testing focuses on the entire system from end to end.||Sanity testing focused on selected components of a system.|
|Smoke Testing is like General health check-up.||Sanity testing is like special health check-up.|
Both smoke testing and sanity testing can either be executed manually or use an automation tool. When automation tools are used, tests are initiated to generate the build automatically. Based on the software product requirements, it is possible to perform smoke or sanity testing in the same software build. In such cases, you should execute smoke testing first then you may go ahead with the sanity testing. In industries, test cases for sanity testing are usually combined with smoke test cases to speed up the execution. Hence it is common to use these terms interchangeably by developers.
I hope the difference is clear with the discussion between smoke testing and sanity testing. To know more about different types of testing and how to conduct them practically, you should join QA certification program at JanBask Training to get in-depth knowledge of the subject and learn how to design test cases for the software build.
A dynamic, highly professional, and a global online training course provider committed to propelling the next generation of technology learners with a whole new way of training experience.
Receive Latest Materials and Offers on QA Testing Course