What is Sanity Testing?
Sanity testing is a type of software testing that checks whether the software is ready for further testing or not. It is a quick and high-level testing process that is done to verify that the software application is functioning as expected after a small change has been made to the code. The purpose of sanity testing is to ensure that the most critical and important functionalities of the application are working as expected and that any major issues or bugs have been fixed.
Sanity testing is typically performed after a new build or version of the software has been released, or after a bug fix has been applied to the code. It is different from other testing processes like regression testing, which tests the entire application after a significant change has been made to the code.
During a sanity test, a small set of test cases are executed, covering the most critical and basic functions of the application. These test cases should be quick to execute and easy to understand. The main goal of the sanity test is to verify that the application is stable enough to proceed with further testing.
If the sanity test is successful, the software can be considered stable enough to proceed with more detailed testing, such as integration testing or functional testing. However, if any issues are found during the sanity test, the development team will need to address them before further testing can be done.
It’s important to note that sanity testing is not meant to be a comprehensive testing process. It’s a quick and simple check to ensure that the software is ready for further testing. It’s also important to customize the sanity test based on the specific requirements and features of the software being tested.
How to perform?
- Identify the critical functionalities: The first step in performing sanity testing is to identify the critical functionalities of the application that need to be tested. This can be done by analyzing the requirements document, user stories, and other documentation related to the application.
- Prepare test cases: Once the critical functionalities have been identified, the next step is to prepare a set of test cases that cover these functionalities. The test cases should be simple and quick to execute, and they should verify that the application is stable enough to proceed with further testing.
- Execute test cases: The test cases prepared in the previous step are then executed on the application. It’s important to note that during sanity testing, only a small set of test cases are executed, covering the most critical and basic functions of the application.
- Analyze results: After the test cases have been executed, the results are analyzed to determine whether the application is stable enough to proceed with further testing. If the results indicate that the application is stable and functioning as expected, then further testing can be done. However, if any issues are found during the sanity test, the development team will need to address them before further testing can be done.
- Document the test results: It’s important to document the results of the sanity test for future reference. This includes documenting any issues or bugs that were found during the testing process, as well as any actions taken to address these issues.
When to perform Sanity Testing?
- Sanity testing is typically performed after a new build or version of the software application has been released, and before further testing is done. It is a quick check to determine if the most critical and basic functions of the application are working as expected.
- Sanity testing is usually done when there is a limited amount of time available for testing, and when the application needs to be quickly verified for its basic functionality. It is also done when a new build or version of the application is released, to ensure that the application is stable enough for further testing.
- Additionally, sanity testing is often performed in conjunction with regression testing. Regression testing is done to ensure that any changes made to the application do not adversely affect the existing functionality. Sanity testing is done to ensure that the basic functionality of the application is still intact after the changes have been made.
Examples Of Sanity Scenarios:
E-commerce Application:
- Login functionality: Verify that users can log in to the website with their credentials and access their account information.
- Search functionality: Verify that the search function is working correctly and returning relevant results.
- Product listing: Verify that the products are listed on the website with accurate information such as price, availability, and product description.
- Cart functionality: Verify that users can add products to the cart, view the items in the cart, and proceed to checkout.
- Payment gateway: Verify that the payment gateway is working correctly and users can complete their transactions without any issues.
- Shipping options: Verify that the shipping options are available and displayed correctly with accurate delivery time and cost.
- Order confirmation: Verify that users receive an order confirmation email with accurate information about their purchase.
- Order tracking: Verify that users can track their orders and get real-time updates on the delivery status.
- Contact Us page: Verify that the contact us page is working correctly and users can submit their queries or complaints.
- Homepage: Verify that the homepage is loading correctly and all the essential components such as banners, product categories, and special offers are displayed.
Banking Application:
- Login functionality: Verify that users can log in to the application with their credentials and access their account information.
- Account information: Verify that users can view their account balance, transaction history, and other account information.
- Transfer functionality: Verify that users can transfer funds between their accounts or to other accounts within the bank.
- Bill payment functionality: Verify that users can pay their bills online and that the payment is processed correctly.
- ATM functionality: Verify that users can withdraw cash, deposit funds, or check their account balance at an ATM.
- Credit card functionality: Verify that users can view their credit card statements, make payments, and check their rewards points.
- Customer service functionality: Verify that users can contact customer service through the application and get assistance with their banking needs.
- Security features: Verify that the application has adequate security measures, such as two-factor authentication and encryption.
- Alerts and notifications: Verify that users receive alerts and notifications for any important account activities, such as large transactions or account changes.
- Mobile banking: Verify that the mobile banking functionality is working correctly, and users can access their account information and perform transactions through their mobile devices.
In conclusion, sanity testing is an important part of the software testing process. It helps to ensure that the most critical and basic functions of the application are working correctly and that any major issues or bugs have been addressed. By performing sanity testing before further testing, software development teams can save time and resources by identifying and addressing issues early in the testing process.
Thanks for reading the article. Please share with QA folks !!!