๐กOverview
aka Back-end Testing
Last updated
aka Back-end Testing
Last updated
Database testing is the process of verifying that a database management system and the application functions interacting with it are working as expected.
Validate existence of values in database table
Validate correctness of values in database table
Validate completeness of values in database table
Ensures Data Integrity - Tests verify that data remains valid and consistent under all conditions.
Finds Bugs Early - Testing the data layer before releasing to users finds issues related to data structures, queries, and transactions.
Confirms Data Migrations - Database tests run after data migrations verify data was migrated correctly with no loss or corruption.
Checks Performance - Load and stress tests the database under varying volumes of data and traffic.
โ unit tests - test individual tables, queries, stored procedures
โ integration tests - test how multiple database components work together
โ Regression tests - rerun previous tests after a change to ensure no regressions
โ Load/Performance tests - test behavior under high load/usage
โ Stress tests - push beyond normal limits to find breaking points
โ Recovery tests - ensure database can recover from failure/crash
Manual database testing involves validating the database schema, data, queries, transactions, constraints, etc without using automated tools. Some key aspects of manual database testing include:
SQL Query Testing - Executing SQL SELECT statements manually to verify the correct data is returned. Comparing expected vs actual results.
CRUD Testing - Manually inserting, updating, deleting and reading data from tables to test data integrity.
Constraint Testing - Testing constraints like primary keys, foreign keys, unique keys by inserting invalid data to see if errors are handled properly.
Transaction Testing - Manually testing transactions like commits, rollbacks, concurrency issues by running transactions and verifying data consistency.
Connection Testing - Testing database connections by manually configuring/closing connections. Checking for errors and testing connection pool thresholds.
Backend Testing - Directly accessing the database using DB management tools like Toad or SQL server clients and running SQL queries and DBA operations.
Static Data Testing - Verifying any lookup or master data in the database to ensure it matches expected values.
Documentation - Recording test cases, expected results, defects, queries, screenshots, etc in spreadsheets/word docs/wikis.
Ad-hoc Testing - Exploratory testing using SQL queries on live databases to find defects.
The goal of manual testing is to simulate real-world usage and find bugs without test automation. It provides deeper control and insights into database components. But it often has lower test coverage than automated testing.