Sanity Testing:
A sanity test or sanity check is a basic test to quickly evaluate the validity of a claim or calculation. In mathematics, for example, when dividing by three or nine, verifying that the sum of the digits of the result is a multiple of 3 or 9 (casting out nines) respectively is a sanity test.
In computer science it is a very brief run-through of the functionality of a computer program, system, calculation, or other analysis, to assure that the system or methodology works as expected, often prior to a more exhaustive round of testing
In software development, the sanity test (a form of software testing which offers “quick, broad, and shallow testing” determines whether it is reasonable to proceed with further testing.
Software sanity tests are commonly conflated with smoke tests. A smoke test determines whether it is possible to continue testing, as opposed to whether it is reasonable. A software smoke test determines whether the program launches and whether its interfaces are accessible and responsible (for example, the responsiveness
of a web page or an input button). If the smoke test fails, it is impossible to conduct a sanity test. In contrast, the ideal sanity test exercises the smallest subset of application functions needed to determine whether the application logic is generally functional and correct (for example, an interest rate calculation for a financial application). If the sanity test fails, it is not reasonable to attempt more rigorous testing. Both sanity tests and smoke tests are ways to avoid wasting time and effort by quickly determining whether an application is too flawed to merit any rigorous testing. Many companies run sanity tests on a weekly build as part of their development process.
The Hello world program s often used as a sanity test for a development environment. If Hello World fails to compile the basic environment (or the compile process the user is attempting) has a configuration problem. If it works the problem may be a bug in the specific application being compiled.
Many More Articles on Types of Testing
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.
Can anyone please explain me the difference between smoke and sanity testing please?
Hi Rajesh, Smoke Testing: When a build is received, a smoke test is run to check if the build is stable and it can be considered for further testing or not.Smoke testing can be done for testing the stability of any interim build. Smoke testing is also known as build verification testing. Sanity Testing: Once a new build is obtained after some defect fixes,then, instead of doing a through regression testing, a sanity check is performed so as to ascertain the build has indeed fixed the issues and no new defects have been introduced by the fixes. You can consider… Read more »
Thanks for the detailed explanation. However I am still confused between regression and retesting. Can you please explain the difference between the two?
Testing the same defect to verify if it has been fixed or not is known as retesting while testing the other areas of the application that might get impacted after the fixes is known as regression testing.
Hi All, Let me share the difference between smoke and sanity testing from my experience. Smoke Test: When a build is received, a smoke test is run to ascertain if the build is stable and it can be considered for further testing. Smoke testing can be done for testing the stability of the received build. Smoke tests can be executed for platform qualification tests. Sanity testing: Once a new build is obtained with minor changes, instead of doing a complete regression tests, a sanity is performed so as to ascertain the build has indeed rectified the issues and no further… Read more »
1. Smoke testing originated in the hardware testing practice of turning on a new piece of hardware for the first time and considering it a success if it does not catch fire and smoke. In software industry, smoke testing is a shallow and wide approach whereby all areas of the application without getting into too deep, is tested. A sanity test is a narrow regression test that focuses on one or a few areas of functionality. Sanity testing is usually narrow and deep. 2. A smoke test is scripted�either using a written set of tests or an automated test. A… Read more »
4. Smoke testing will be conducted to ensure whether the most critical areas of the application are working fine, but does not go into much details.
Sanity testing is a cursory testing; it is performed whenever a cursory testing is sufficient to prove the application is functioning according to specifications. Sanity testing is a subset of regression testing.
5. Smoke testing can be considered as normal health check up to a build of an application before taking it to testing in depth.
Sanity testing is to verify whether requirements are met or not, checking all features breadth-first.
Hi,
I have been working as a developer in my present company. I have done a software testing course. Now I am looking to shift from Software Development to Software Testing. Can anyone please share how to do this?
Can anyone please explain me the difference between priority and severity?
Hi Ricky,
Let me try to explain you the difference between Priority and Severity.
The term “priority” is associated with scheduling, and the word “severity” is associated with standards. “Priority” means something is afforded or deserves prior attention; a precedence established by urgency or order or importance.
Severity is the state or quality of being severe; severe implies adherence to rigorous standards or high principles and often suggests harshness; severe is marked by or requires strict adherence to rigorous standards or high principles. For example, a severe code of behavior.
Most importantly, the words priority and severity do come up in bug tracking tools. A variety of commercial, problem-tracking / management software tools are available for example Bugzilla or mantis. These tools, with the detailed input of software test engineers, give the team complete information so developers can understand the bug, get an idea of its severity, reproduce it and fix it. The fixes are based on project priorities and severity of bugs. The severity of a problem is defined in accordance to the end client�s risk assessment, and recorded in their selected tracking tool. A buggy software can severely… Read more »
I will try to explain Smoke Testing and Sanity Testing with a practical example: Consider you have a hollow pipe and you intend to check if it is fit to use or not. Smoke Testing: We will do an initial end to end check if the pipe really allows the flow from one end to other end. For example, pass the smoke inside the pipe and check if the smoke is coming out come out from other end. If the smoke comes out, we can certify that the pipe can be used as Testable pipe. Hence we can say that… Read more »
Hi Niharika,
Thanks for sharing the practical example to explain us the difference between smoke and sanity testing. I have a doubt in this.
You mentioned “If the smoke comes out, the pipe can be used as Testable pipe”. Now my question here is what we will do if the smoke does not come out of the pipe at all? What we will do in such a case?
Hi Vijay,
In such a case, we will fail the build and we will not do any testing on the build as the most basic test failed. Build is not fit for testing. There is no point in doing any further testing and we will wait for a new build and then we will run this basic test on our new build.
what is the difference between functional testing and automation testing?
Thanks for the nice explanation friends. Now I have clearly understood the exact differences between
sanity testing and smoke testing.
This is a fantastic website on Software Testing which has cleared so much of concepts. I owe all my success to you!
Thanks for the excellent feedback Jyoti!
Hi there,
I dont understand the sanity test…some tell it as subset of regression test and some as test to pass (breadth wise) ..and some tell as test to pass…similar to smoke test…what does sanity test actually means….please clarify…..!!