Database Testing is a type of software testing that checks the schema, tables, triggers etc. of the database under test. It involves creating complex queries for performing the load or stress test on the database and check its responsiveness. It checks integrity and consistency of data.
Database testing usually consists of a layered process that includes the User Interface (UI) layer, the business layer, the data access layer and the database.
Objective of the Database Testing:
- Ensure Data Mapping:
It checks whether the fields in the user interface or front end forms are mapped consistently with the corresponding fields in the database table.
- Ensure ACID Properties of Transactions:
Every transaction a database performs has to stick to these four properties: Atomicity, Consistency, Isolation and Durability.
- Ensure Data Integrity:
The updated and the most recent values of shared data should appear on all the forms and screens. The value should not be updated on one screen and display an older value on another one. The status should also be updated simultaneously.
- Ensure the Accuracy of the Business Rules:
Complex databases leads to complicated components like relational constraints, triggers and stored procedures. Hence in order testers come up with appropriate SQL queries to validate the complex objects.
Database Testing Attributes:
Transactions means the access and retrieve of the data. Hence in order during the transaction processes the ACID properties should be followed.
- Database Schema:
It is the design or the structure about the organization of the data in the database.
When a certain event occurs in a certain table, a trigger is auto-instructed to be executed.
It is the collection of the statements or functions governing the transactions in the database.
Database Testing Process:
- Test Environment Setup:
Database testing starts with the setting up the testing environment for the testing process to be carried out in order get a good quality testing process.
- Test Scenario Generation:
After setting up the test environment test cases are designed for conducting the test. Test scenario involve the different inputs and different transactions related to database.
Execution is the core phase of the testing process in which the testing is conducted. It is basically related to the execution of the test cases designed for the testing process.
Once the execution phase is ended then all the process and the output obtained is analyzed. It is checked whether the testing process has been conducted properly or not.
- Log Defects:
Log defects are also known as report submitting. In this last phase tester informs the developer about the defects found in the database of the system.
Misconceptions related to Database Testing:
- It requires experts to carry out database testing
- The process of database testing is lengthy
- It adds extra work bottlenecks
- It slows down the overall development process
- It is a highly costly process
- Software Engineering | Differences between Sanity Testing and Smoke Testing
- Software Engineering | Comparison between Regression Testing and Re-Testing
- Sanity Testing | Software Testing
- Software Testing | Reliability Testing
- Software Testing | Mutation Testing
- Software Testing | Load Testing
- Gray Box Testing | Software Testing
- Unit Testing | Software Testing
- Software Testing | Scenario Testing
- Software Testing | Static Testing
- Stress Testing | Software Testing
- Acceptance Testing | Software Testing
- Software Testing | Dynamic Testing
- Software Testing | Spike Testing
- Software Testing | Accessibility 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.