Testing Resources Logo

Database Testing - Key Test Cases for Verifying Data Integrity and Changes in Web Applications

Database operations are fundamental to most web applications. This guide covers test cases for database functionality, including CRUD operations, data integrity, transaction handling, performance, and security considerations.

NrTest Idea
1Check script deployment time
2Check that rows created or updated by the script get correct created_by and updated_by values
3Check if there is a need to change old data
4Check if necessary indexes are added
5Check that necessary foreign keys are added and that they refer to the correct table and column
6Check that table, column, index, foreign key, etc. names use the same style as the rest of the database
7If any new column is added to the database, check if it has an informative description
8Check that database column type is correct
9Check that database column has the correct size
10Check if the database column should have a default value
11Check if the database column should be mandatory
12Check that the table has a primary key
13If a table or field is changed, check if there are connected tables or fields that also need to be changed. For example, if a field type is changed and there exists a history table, it should be changed there as well
14Check that application deployment runs added scripts automatically