Sanity Testing is a subset of regression testing. Sanity testing is performed to ensure that the code changes that are made are working as properly. Sanity testing is a stoppage to check whether testing for the build can proceed or not. The focus of the team during sanity testing process is to validate the functionality of the application and not detailed testing. Sanity testing is generally performed on build where the production deployment is required immediately like a critical bug fix.
Functionality of Sanity Testing:
The major functionality of sanity testing is to determine that the changes or the proposed functionality are working as expected. If the sanity test fails, software product is rejected by the testing team to save time and money. It is performed only after the software product has passed the smoke test and Quality Assurance team has accepted for further testing.
Example of Sanity Testing:
In an e-commerce project, main modules are login page, home page, user profile page, user registration etc. There is a defect in the login page when the password field accepts less than four alpha numeric characters and the requirement mentions that this password field should not be below eight characters. Hence, the defect is reported by the testing team to the development team to resolve it. Then the development team fixes the reported defect and sends it to the testing team for clearance. Then the testing team checks whether the changes done are working fine or not. It is also determined if it does have an impact on other related functionalities. Now there is a functionality to update the password in the user profile page. As part of the sanity testing, login page is validated as well as the profile page to ensure that the checks are working fine at both the places.
Features of Sanity Testing:
- Subset of Regression Testing:
Sanity testing is a subset of regression testing and focuses on the smaller section of the application.
Most of the times sanity testing is not scripted.
- Not documented:
Usually sanity testing is undocumented.
- Narrow and deep:
Sanity testing is narrow and deep approach of testing where limited functionalities are covered deeply.
- Performed by testers:
Sanity testing is normally performed by testers.
Advantages of Sanity Testing:
- Sanity testing helps in quickly identify defects in the core functionality.
- It can be carried out in lesser time as no documentation is required for sanity testing.
- If the defects are found during sanity testing, project is rejected that is helpful in saving time for execution of regression tests.
- Software Engineering | Differences between Sanity Testing and Smoke Testing
- Software Engineering | Comparison between Regression Testing and Re-Testing
- Software Testing | Non-functional Testing
- Software Testing | Stability Testing
- Software Testing | Endurance Testing
- Performance Testing | Software Testing
- Software Testing | Scalability Testing
- Smoke Testing | Software Testing
- Software Testing | Load Testing
- Software Testing | Mutation Testing
- Software Testing | Reliability Testing
- Gray Box Testing | Software Testing
- Unit Testing | Software Testing
- Beta Testing | Software Testing
- Stress Testing | Software Testing
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.