May 22, 2023

Database Testing

Great job on starting a new lesson! After reading this lesson, click Next 👉 button at bottom right to continue to the next lesson.

Database testing

Database testing is a type of software testing that tests the structure, data, and database objects of a database system. Database testing tests the schema, and database objects, such as tables, views and triggers of the database and verifies the data integrity and consistency. Database testing also involves creating queries to perform load testing on the database to test its performance aspects, like responsiveness and latency.

Database testing examples

  • You do the database testing of your online shopping website by testing the data validation, data conversion, and data integrity of the customer orders, payments, and deliveries. You insert, update, delete, and retrieve data in the user interface and run queries on the database to verify that the data is correct.
  • You perform database testing of your inventory management system by testing the schema, tables, columns, keys, and indexes related to product inventory, sales, and purchases. You create and execute queries to test the constraints, relationships, and dependencies of the database objects.
  • You do the database testing of your payroll system by testing the stored procedures, functions, and triggers managing the employee tax, benefits, and salary. You create and run queries to test the logic, calculations, and validations of the database operations.
  • You perform the database testing of your social media platform by testing the performance and scalability of the user profiles, posts, comments, and likes. In your test environment, you execute queries to simulate high volume and concurrent data transactions and measure the response time, throughput, and error rate of the database.

Tips for database testing

  • Identify the database requirements from the technical design and specifications of your software.
  • Design the database test cases that cover the most frequently used, realistic and critical test scenarios of your software.
  • Use database testing tools and techniques to automate your database test cases to run.
  • Analyze and the database test results and report them, along with any database defect, data quality defects and recommendations.

FAQ (interview questions and answers)

  1. What is the difference between database testing and data warehouse testing?
    Database testing is a type of software testing that tests a single or multiple databases that store operational data for one or more software or application(s). Data warehouse testing is a type of software testing that tests a data warehouse that stores historical data for analysis and reporting purposes.
  2. What are some tools for database testing?
    The tools depend on the DBMS in use e.g. SQL Server Management Studio, Oracle SQL Developer, MySQL Workbench, Toad for Oracle, etc.
  3. Is database testing a type of functional or non-functional testing?
    Database testing includes both functional and non-functional aspects of testing. Functional testing includes testing the functionality of the database objects. Non-functional testing includes testing the data quality, performance, security, reliability, etc. of the database.
  4. How do you perform data migration testing?
    You perform data migration testing (called ETL testing) by verifying that the data is transferred correctly from a source to the target without any loss or corruption. You compare the source and target data using queries or tools and test for any omissions or discrepancies.
Remember to just comment if you have any doubts or queries.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.