LoadComplete can read data from external data sources and use this data to set request parameters during the test. This topic describes the specifics of working with external data sources in LoadComplete.
Overview
LoadComplete can load data from the following sources:
-
Databases: SQL Server, MySQL, Access, Oracle and so on
To access external data sources, you use variables. LoadComplete offers special variable types to read data from the supported data sources.
For example, you can store a list of logins and passwords for virtual users in an Excel file and create two variables named Login and Password bound to the corresponding columns in that file. Then you can replace the hard-coded login and password in your recorded scenario with these variables. As a result, when you run the test, virtual users will log in using different accounts from the Excel file, so that the testing can be more realistic.
Using external data sources also makes it possible to manage test data – add, modify or remove values – outside of LoadComplete IDE. For example, you can prepare the data file beforehand on a computer without LoadComplete installed.
Creating Data Source Bound Variables
To learn how to create and configure Excel, CSV and database variables in LoadComplete, see Creating, Modifying and Deleting Variables.
Data Access Types
Excel, CSV and database variables support sequential and random access to values in the linked data source. The access type is specified by the variable’s Value access type option.
For example, sequential access of the type Item index equals virtual user index can be used for values that need to be unique for each virtual user, such as logins and passwords. Sequential access of the type Next value on each use (and similar) can be used for virtual users to repeatedly loop through all values in the data source, either by each virtual user individually or by all virtual users working together. Random access, in its turn, can be used to fetch arbitrary values from the data source.
For detailed information, see Value Access Types.
Considerations for Using External Data Sources
Common Considerations
-
A data source bound variable can provide access only to a single field from this data source. To use data from multiple data source fields, you need to create separate variables for each data field.
-
If your test simulates virtual users using multiple workstations, the data source needs to be accessible only to the LoadComplete computer, not necessarily to the Remote Agent workstations. It is LoadComplete that is responsible for reading data from the data source and transferring it to the remote workstations.
Excel Files
To use Excel data files, any software below must be installed on your LoadComplete computer:
-
Microsoft Office Excel 2007–2013.
-
Microsoft Access Database Engine 2010 Redistributable. You can download it on the Microsoft web site:
https://www.microsoft.com/en-us/download/details.aspx?id=13255
-
2007 Office System Driver: Data Connectivity Components. You can download them on the Microsoft web site:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=23734
Databases
-
Using a database as the data source requires that the appropriate database provider be installed on the LoadComplete computer. To learn more about database providers and the syntax of database connection strings, visit http://connectionstrings.com.
-
When selecting data from a database using a custom query, use a specific
SELECT Field_Name
query instead of a genericSELECT *
query. This will ensure better query performance, especially given that a variable can be bound only to one field in the resulting recordset (see above).
See Also
Preparing Test Data
About Variables
Types of Project Variables
Creating, Modifying and Deleting Variables
Specifying Appropriate Request Data