Sanity Testing

What is meant by Sanity Testing?

Sanity Testing is one of the useful testing methodologies which is performed to ensure the fixation of previously detected bugs and simultaneously to make sure that any sort of minor or major changes or modifications introduced in the code or functionalities or module does not leads to existence of any new defect i.e. alteration produced in the software applications does not impact and affects the existing core functionalities and working of the application.

Why is Sanity Testing Important?

The primary purpose of sanity tests is to verify and validate the veracity of essential functionalities of software after regression testing as during the course of regression testing phase, fixation of bugs or any modification in the code or module might produce impact on or deviation in the intended functionalities of the software application. Sanity test are basic general tests which are used to evaluate any new functionalities added to or any sort of changes produced in the application and to ensure their introduction or existence does not impact the existing & intended functioning of the software product.

In sanity testing, rational thinking & logic implementations of developers are being tested through their developed application (build) i.e. if the developer had applied basic rationalities correctly while developing applications or not.

If the build fails to execute basic and normal functions and operations properly, then the build is considered deemed unfit for thorough and rigorous testing activities. A fail in the sanity test places the build in the suspended list of software builds, deferred for further thorough & rigorous testing until the build passes the sanity test. Thus, sanity tests are useful in saving time and efforts of testing team to work on comparatively unstable build.

What is the Difference Between Sanity and Smoke Testing?

You can also check our next article on Sanity Testing vs. Smoke testing here.

Features of Sanity Testing:

Unlike smoke testing which is performed on initial/1st build, it is carried out on relatively stable software builds.

which is performed on initial/1st build, it is carried out on relatively stable software builds. Gate for passing the software builds to go through more rigorous testing.

One or more specific functionalities are covered under sanity test.

Rejection of defected software builds, saves time and efforts of the QA team.

Narrow and deep type of regression testing.

It is subset of acceptance testing , and is also known as tester acceptance testing .

, and is also known as . Generally, sanity tests are executed by the testers.

Complete test-cases are not covered under this test.

are not covered under this test. Sanity testing is usually carried out manually. However, automation approach may also be used for the test executions.

No documentation required, and tests are usually unscripted.

It is a type of cursory testing that involves quick rounds of test to guarantee the working of the software as defined under requirement and specifications.

Approach to Sanity Testing:

There is no hard and fast rule to carry out the process of sanity tests execution. Sanity testing is a speedy and quick process of testing the application as it does not involves the scripting of the test cases. In sanity testing, primarily two aspects or elements are considered and tested:

Previously identified or detected bug and issue has been resolved or not?

Whether the introduction of any new feature and functionalities or bug fixation process and patches have affected the core existing functionalities and working of the application?

So, following steps in a sequential manner may be considered and executed during sanity testing.

Identify the newly added functionalities and feature along with the modification or changes introduced in the code during bug-fixation process .

. Evaluate these identified features and changes to ensure their intended and proper working.

Next, we can consider and test all the related parameters, associated functionalities and elements of the above evaluated features and changes to ensure their appropriate and expected functioning.

If all goes well, then build can be subjected to more thorough and strenuous testing.

Why Sanity Testing Instead of Regression Testing?

Regression Testing does not allow testers to execute testing activities in a lesser time. Further, it increases the budget of the project due to its requirement of more manpower and time to execute complete test cases.

Coming to sanity testing, it is basically a subset of regression testing. It is a kind of surface level testing that ensures the expected working of specific functionalities of the software after multiple regressions. It provides benefits of carrying out testing in a limited time period. In addition, it does not affect the project cost due to lesser requirement of manpower and time to execute limited number of test cases / non-complete test cases in comparison to regression testing.

When to go for Sanity Checking?

After completion of thorough regression testing.

After few releases of software or its versions.

Besides, a testing methodology, sanity testing may be seen as a time-management tool in software development life cycle (SDLC) that provides software acceptability for more thorough and rigorous testing in a quick time so as to avoid and save tester's precious time and efforts on examining defected software build.