Testing with databases

Using SQL-conversant external data sources in your tests.

Overview

Many applications today, whether desktop, mobile or web-based, involve the storage and retrieval of structured data. And an ever-growing number of applications rely on external database management systems (DBMSs) to manage that data. Most of these DBMSs “speak” Structured Query Language (SQL), and are supported by a wide range of drivers, known as ODBC drivers, available across platforms. This allows the host applications to take advantage of a standard language and interface for storing and retrieving records, running queries for various sorts of information, and manipulating the stored data.

While applications can be tested through their GUI front ends, it is often important, for purposes of efficiency and well as test coverage, for an automated test system to be able to directly interface with an AUT’s database. Data records can be retrieved by the test system for inspection, added to the database to ensure that the AUT responds correctly, or manipulated in various ways.

TestArchitect offers a set of actions that allow your tests to connect to and interact with databases of SQL-conversant DBMS systems.

An additional benefit of these actions is that your test can use a database to supply its test data, rather than relying on internal data sets or external text files. Databases are often a preferable choice for the storage and generation of test data.

Note:
In order to query a database, you must be familiar with SQL commands. A variety of good references and tutorials on SQL are available, including this SQL Tutorial from W3Schools.

Prerequisites

Database use cases
TestArchitect offers a number of built-in actions and automation methods that allow for tests to connect to, and query, SQL-compliant databases. This allows for an expanded form of data-driven testing beyond that which relies on TestArchitect’s proprietary data sets. It also expands the possibilities for performing tests on database-dependent applications. This topic presents a few of the typical test configurations involving SQL-based databases, along with specific examples.

Microsoft SQL Server
Information specific to testing with Microsoft SQL Server

MySQL Server
Information specific to testing with MySQL Server

Microsoft Excel
Information specific to testing with Microsoft Excel

Oracle Database
Information specific to testing with Oracle Database.


Copyright © 2020 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1(800) 322-0333