Why and how we perform Database Testing for an application

Posted By : Anjali Pandey | 31-Jul-2019

 

Purpose: The purpose of the Database test is to ensure that the data contained in the database and its structure meets the project requirements. By the way, many other user activities are taking place every second on the Internet and a lot of data is being generated in the form of data browsing, registration fills. Forms, online shopping and marking attendance etc., the need for database testing plays an important role in maintaining the consistency, integrity and security of the data.

 

What is Database Testing: Users who input through data front-end are stored in back-end databases. It is the process of testing database functions, triggers, and SQL queries. Thereby validating database tables, data models, and database schema as per information provided at the User Interface. Major misconceptions about testing are that it is constrained to Front-End (User Interface) only, but each and every bit of information entered by the user is stored at the Back-End (Database) which is equally respected while testing.

Database testing can be grouped into three categories:

  • The structural testing is related to the internal structure of the database (i.e. metadata). This includes verification of tables and all other database objects, which are not easily accessible by users, such as columns, keys, indexes, schema, triggers, functions, etc. It could also include testing of your DB server.
  • Functional testing depends on the data the way the data is mapped to the database from the front-end. (Such as the user clicking on the button affects the related tables / columns).
  • Non-functional test examines how the database performs under the extreme levels of expected load and stress. Safety tests are also here.

1. Structural database testing : Data is moving back and forth between UI and database in a specific application. Therefore, it is important to make sure that the data is correctly mapped between front-end and back-end.

 

Schema testing

A schema app represents the internal structure of the database. Imagine how various objects like tables, columns and fields are arranged and related in the database. The main function for QA engineers is to prove that the schemata is correctly mapped between the front-end and the database.

Schemata are tested using several methods:

  • An SQL Query DESC <table name> for schema validation.
  • Regular expressions for individual field names/values validation
  • Schema Crawler and similar tools.

 

Tables and column validation: Relational databases organize data in tables and columns. While testing them, one mainly has to validate that:

DB fields support user inputs as outlined in the requirements.
The columns and fields have the required length and naming convention.
The columns and fields in the database are mapped correctly with the front-end.
The columns have the data types and field lengths that are compatible with the front-end, etc.

 

Testing the keys and indexesIndexes are used to quickly locate a piece of data in a DB. Primary and foreign keys are used to uniquely identify a DB row. When testing keys and indexes, validate that:

  • All required constraints were created for the Primary and Foreign Keys.
  • All foreign key references are valid.
  • All indexes and keys observe the specified naming convention.
  • All fields and indexes have the required length and size, etc.

 

 

 

 

 

Related Tags

About Author

Author Image
Anjali Pandey

Anjali is a QA Software Engineer, with experience in Manual Testing. She loves finding Bugs in application. Her hobbies are going for picnics with Friends and Reading stories.

Request for Proposal

Name is required

Comment is required

Sending message..