One of the popular data storage for data-driven tests is database tables. TestComplete supports this type of storage and allows you to retrieve data from it.
To access data stored in database tables, you can use DB Table variables. These variables are used by the Data-Driven Loop operation that allows you to iterate through the storage’s records in keyword tests. See Creating Data-Driven Loops and Data-Driven Testing With Keyword Tests - Tutorial.
You can retrieve data from database tables using the
ADO object provided by TestComplete, or ActiveX controls, or ADO objects created via COM (see Working With Databases). TestComplete also includes the
ADODriver scripting object that simplies retrieving data from databases and iterating through rows in tests. See DDT.ADODriver and Using DDT Drivers.
Below are some specifics of using the
ADODriver scripting object for reading data from databases.
The object assumes that each row in a database table contains data for one test run. Tables that use multiple rows for one run are not supported.
TestComplete uses Microsoft ADO to retrieve data from databases.
The resulting record set can be a database table, or it can be returned by a stored procedure or query.
The object does not support those columns that store data in the format which is not compatible with OLE Variant. For instance, columns that store images or other binary data are not supported.
Data-Driven Testing - Basic Concepts
Preparing Data for Data-Driven Testing
Organizing Data Storages
Using Keyword Tests for Data-Driven Testing
Creating Data-Driven Loops
Data-Driven Testing With Keyword Tests - Tutorial
Using Scripts for Data-Driven Testing
Using DDT Drivers
Working With Databases