Sanity testing, a software testing technique performed by the test team for some basic tests. The aim of the basic test is to be conducted whenever a new build is received for testing. The terminologies such as Smoke Test or Build Verification Test or Basic Acceptance Test or Sanity Test are interchangeably used, however, each one of them is used under a slightly different scenario.
Sanity testing is the subset of regression testing and it is performed when we do not have enough time for doing testing.
Sanity testing is the surface level testing where QA engineer verifies that all the menus, functions, commands available in the product and project are working fine.
Sanity test is usually unscripted, and helps to identify the dependent missing functionalities. It is used to determine if the section of the application is still working after a minor change.
Sanity testing can be narrow and deep. Sanity test is a narrow regression test that focuses on one or a few areas of functionality. Sanity testing is usually performed when any minor bug is fixed or when there is a small change in the functionality. It is a kind of software testing which is done by the testers to ensure that the functionality is working as expected.
Let’s take Example of sanity Testing:
For example, in a project there are 5 modules: login page, home page, user’s details page, new user creation and task creation.
Suppose we have a bug in the login page: the login page’s username field accepts usernames which are shorter than 6 alphanumeric characters, and this is against the requirements, as in the requirements it is specified that the username should be at least 6 alphanumeric characters.
Now the bug is reported by the testing team to the developer team to fix it. After the developing team fixes the bug and passes the app to the testing team, the testing team also checks the other modules of the application in order to verify that the bug fix does not affect the functionality of the other modules. But keep one point always in mind: the testing team only checks the extreme functionality of the modules; it does not go deep to test the details because of the short time.
Sanity testing is performed when the development team needs to know quickly the state of the product after they have done changes in the code, or there is some controlled code changed in a feature to fix any critical issue, and stringent release time-frame does not allow complete regression testing.
Few points about Sanity testing:
- It is a surface level testing which follows narrow and deep approach concentrating on the detailed testing of some limited features.
- In sanity testing the testers verifies the commands and functions and all the menus in the product.
- It is a subset of regression testing.
- It is performed when we do not have enough time for detailed testing.
- Sanity testing is usually not scripted.
- Sanity testing is brief or quick testing in order to ensure that the changes are working as expected and as per the specification documents.
- Sanity testing checks the minor bug fixes and the functionality changes are working at the same time it also ensures that the related functionality is intact.
Advantages of Sanity testing
- It saves lots of time and effort because Sanity testing is focused on one or few areas of functionality.
- There is no effort put in towards it’s documentation because it’s usually unscripted.
- It helps in identifying the dependent missing objects.
- It is used to verify that a small functionality of the application is still working fine after a minor change.
Disadvantages of Sanity testing
- Sanity testing focuses only on the commands and functions of the software.
- It does not go to the design structure level so it’s very difficult for the developers to understand as how to fix the issues found during the sanity testing.
- In sanity testing the testing is performed only for some limited features so if there is any issue in other functionalities then it will be difficult to catch them.
- Sanity testing is usually unscripted so future references are not available.