Sanity Testing – Software Testing
Sanity testing is a type of software testing that aims to quickly evaluate whether the basic functionality of a new software build is working correctly or not. It is usually performed on builds that are in the initial stages of development before the full regression testing is performed. Sanity testing is limited in scope and typically focuses on critical functionality and does not aim to uncover every possible error or bug in the system. It is a quick and lightweight way to ensure that the software is functioning as expected before further testing is conducted.
What is Sanity Testing?
It is a subset of regression testing. Sanity testing is performed to ensure that the code changes that are made are working properly. Sanity testing is a stoppage to check whether testing for the build can proceed or not. The focus of the team during the sanity testing process is to validate the functionality of the application and not detailed testing. Sanity testing is generally performed on a build where the production deployment is required immediately like a critical bug fix.
Functionality of Sanity Testing:
- Verification of Integration: To make sure that recent adjustments or bug fixes haven’t negatively impacted the integration of various modules or components, sanity testing may involve an integration check.
- Verification of Fixed Bugs: Sanity testing follows bug fixes or modifications to make that associated features continue to function appropriately and that reported issues have been satisfactorily resolved.
- Efficiency of Time and Resources: Sanity testing saves time and aids in resource optimization by rapidly determining whether a build is stable enough for further testing.
- Check for Regression: Sanity testing may include a rudimentary check for regressions to make sure that current functionalities have not been adversely affected, even if it is not as thorough as regression testing.
- Repetitive Procedure: It can be carried often frequently to swiftly validate each incremental build, particularly in agile and continuous integration setups.
Attributes of Sanity Testing:
In order to comprehend the foundation of sanity testing techniques, we must acquire knowledge of their attributes along with several other components. Therefore, the following are some crucial aspects of sanity testing:
Sanity Testing Attributes
- Narrow and deep: In the Software testing sanity testing is a narrow and deep method to protect the components.
- A Subset of Regression Testing: Subset of regression testing mainly focus on the less important unit of the application. it’s used to test application new features with the requirement that is matched or not.
- Unscripted: sanity testing commonly unscripted.
- Not documented: sanity testing can’t be documented.
- Performed by testers. sanity testing is done by the test engineers.
Sanity Testing Process:
Sanity testing process
- Identification: Identification is the initial phase in the sanity testing process, where we look for newly added features and components as well as code modifications made to address bugs.
- Evaluation: After the identification phase, we will examine recently added features and components and make necessary modifications to ensure they function as intended and in accordance with the specifications.
- Testing: Upon the successful completion of the identification and evaluation phases, we will proceed to the testing phase. In this stage, we examine and evaluate each of the associated parameters, elements, and critical components of the previously analyzed attributed and adjusted them to ensure optimal functionality.
If every step listed above is completed without a hitch, the build can move on to more in-depth and demanding testing, and the release can be approved for comprehensive 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. Sanity testing focuses specifically on a smaller group of features that are essential for the fundamental operation of the program, whereas regression testing confirms that new changes do not negatively affect current functionality.
- Unscripted: Most of the time sanity testing is not scripted. Without using pre-written scripts, testers frequently conduct ad hoc testing on particular functionalities.
- Not documented: Usually, sanity testing is undocumented. Developing thorough test plans is not the main priority, instead, quick and focused testing essential.
- Narrow and deep: Sanity testing is a narrow and deep approach of testing where limited functionalities are covered deeply. Instead of aiming to cover the entire application, the testing effort is focused on particular sections.
- Performed by testers: Sanity testing is normally performed by testers. Examiners concentrate on the regions impacted by the most recent modifications, quickly evaluating their stability.
Advantages of Sanity Testing:
- Sanity testing helps to 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.
- This testing technique is not so expensive when compared to another types of testing.
- It helps to identify the dependent missing objects.
- It is used to verify a small functionality of the system application whether it is still working or not even after a small change.
- It helps in the scenario when the time for testing of the product is limited or having less time to complete the test.
- Quick Feedback: Sanity testing is a fast process that provides quick feedback on the overall functionality of a software build, allowing teams to quickly identify and address any critical issues.
- Cost-effective: Sanity testing is less time-consuming and less expensive than other types of testing, making it a cost-effective solution for evaluating new builds.
- Early Detection of Issues: Sanity testing helps to identify major issues early in the development cycle, which can help to avoid costly rework later on.
- Increased Confidence: Sanity testing helps to increase confidence in the quality of the software, by ensuring that the most critical functions are working as expected before more comprehensive testing is performed.
- Improved Productivity: Sanity testing enables developers and testers to focus on more complex testing scenarios, improving overall productivity and reducing the time required for full regression testing.
Disadvantages of Sanity Testing:
- It focuses only on the functions and commands of the system application.
- It is not possible to cover all the test cases in test scenarios.
- It covers only few functionalities in the system application. Issues in the unchecked functionalities can’t be recovered.
- Sanity testing is usually unscripted. Hence, future references are not available.
- It doesn’t cover the design structure level and hence it will be difficult for development team to identify and fix the issues.
- Limited Scope: The limited scope of sanity testing means that it may not uncover all potential issues or bugs in the software. This means that more comprehensive testing will be required to thoroughly validate the software’s functionality.
- Incomplete Testing: Sanity testing is only a preliminary evaluation of the software, and it does not provide a complete picture of the software’s performance or quality.
- Potential for False Positives: Sanity testing is a quick process that may produce false positives, indicating that a particular feature or function is working correctly when it is actually broken.
- Dependence on Expertise: The success of sanity testing depends on the expertise and knowledge of the tester, who must have a deep understanding of the software’s critical functions in order to perform the tests effectively.
- Time Constraints: While sanity testing is faster than other forms of testing, it can still be time-consuming and may require a significant amount of time and resources to complete. This can be a disadvantage when time is a critical factor in the development process.
Implementation of the sanity testing, live instances, advantages, and disadvantages. When a new feature, modification request, or bug fix is applied to the program, sanity testing is put into practice. Sanity testing is advantageous because it has several benefits, such as providing an expedient evaluation of the calibre of software releases. The process of testing is specific, in-depth, and focused solely on the components that have been affected by the modification.
Share your thoughts in the comments
Please Login to comment...