Database Test Automation

Modified on Wed, 7 Aug at 10:25 AM

TABLE OF CONTENTS

1. Overview

2. Supported Databases

3. Database Verifications

3.1 Automate Database Verifications Leveraging algoQA

3.2 Adding a Parameter in the Node Configuration

3.3.Configuring Default Actions

1. Overview

Database test automation involves using algoQA platform to perform various operations on a database to verify its accuracy and functionality. This process includes executing queries to ensure that the database behaves as expected.

By leveraging algoQA, you can automate these tests to validate database operations and configurations.

2. Supported Databases

Database Name Database Description 


Mongo DB
A NoSQL database that stores data in flexible, JSON-like documents. It is known for its scalability and flexibility, making it suitable for applications with rapidly changing data models.


SQL (Structured Query Language)
SQL is a standard language for managing relational databases. It is used for querying and manipulating data stored in relational database management systems (RDBMS) like MySQL, PostgreSQL, and others.


PostgreSQL
An advanced open-source relational database management system with a strong focus on features, standards compliance, and extensibility. It supports various data types, indexing techniques, and features, such as JSON support and advanced indexing


Redshift
A fully managed data warehouse service provided by Amazon Web Services (AWS). It is optimized for data analysis queries on large datasets and is commonly used for business intelligence and data analytics purposes.

MySQL 
An open-source relational database management system based on SQL. It is widely used for web applications and known for its reliability, ease of use, and performance.

3. Database Verifications

A verification is a logical unit of work that consists of one or more operations performed on a database by passing queries to access and modify its content. For example, in a Sign up scenario, when a user signs up, the database needs to authenticate the new user credentials. These updates are executed within a verification process.

3.1 Automate Database Verifications Leveraging algoQA

Database verifications are based on user requirements. In the Sign up scenario, user creates an account to access the application. User's database connectivity is verified and compared with the information stored in the database.

In the context of the "Sign up" scenario, the user actions include:

  • Creating a new user account: 
  • Entering required information (such as username, email, password, etc.) into the registration form.

  • Clicking on the "Sign up"  button to submit the registration form.

  • Verifying new user details:
    • Logging in to the application using the newly created user credentials (username/email and password).
    • Navigating to the user profile or account settings page to view and verify the details of the newly created account. 
Tip: Database connectivity queries are customized to align with testing requirements for effective execution of test cases.


The following screenshot explains the database verification process of queries and their outcomes:


Leveraging algoQA, you can automate database verifications by following the same procedure described in Web application test automation. However, there are a few specific changes, such as adding a parameter and using default actions, described in the following sections:

3.2 Adding a Parameter in the Node Configuration

Refer to the Profiling article for creating an offline model of an application under test. While creating nodes you can add the parameter.


Perform the following:

  1. On the Main Canvas > click the appropriate node where you want to add the parameter to view the Node in Palette pop-up window and then click the Edit Icon.
  2. Control Panel List Window appears. In this window, add the required parameter in the Control Value text box as shown in the following screenshot.

    For example, if you add a UI element as DB Query, enter the parameter value as PostgreSql_#Query1:-<add your query>. In this, replace <add your query> with your actual query statement.


3.3.Configuring Default Actions

You can configure a particular default action for a database while configuring nodes or recording a scenario using Follow Me feature or Managing workflows using Edit Scenarios. You need to update the default action in case of node configuration, where as in case of using Follow Me and Edit Scenarios features, the system autosuggests the required default action as shown.

The following screenshot represents from autosuggestion of a SQL database action after adding a parameter described in the previous section while editing a scenario using Edit Scenario feature.


Similarly, you can configure a default action while recording a scenario using Follow Me feature.


For more details on configuring defaults actions, refer to Adding or Modifying Default Actions
















Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article