Export (0) Print
Expand All
4 out of 8 rated this helpful - Rate this topic

About Data Binding in Web Tests

By using data binding, a database can provide data for a Web Test. You can bind data from a data source to a part of a Web request that requires data, such as a Form Post Parameter. You can bind to data in a database by clicking Add Data Source.

Additionally, an OLE DB data source can be used for data binding, including .csv files, Excel, Access and SQL Server databases.

You can also use data binding for any of the properties you edit in the Web Test Editor.

Properties that Use Data Binding

Set Credentials

You can bind to data in a database to set the credentials on a test. For example, you can have a list of logon names and passwords that you use in your tests.

For more information, see How to: Set Credentials on a Web Test

QueryString Parameters

You can bind to data in a database for any name and value pairs used in your Web tests.How to: Edit an Existing Web Test

Form Field Parameters

You can bind to data in a database for any input field that appears on a Web form.

Request URL

You can bind the request URL to data in a database file.

Access Methods

Team Edition for Testers supports sequential access, random, and unique access of records in the database when binding to a data source.

Sequential

Starts at the first record and moves through a table row by row. This is the default. This access method will loop through data in a table throughout the duration of a test.

Random

Move randomly through the rows in a table. This access method will loop through data in a table throughout the duration of a test.

Unique

Move sequentially through the data, row-by-row, but only one time for each record. It will not loop.

Considerations for Load Testing

Execution of data driven tests is an important aspect of proper load testing because it more realistically models real world activity and helps ensure that server caches, and so on, are being used effectively.

When your Web tests are assembled in a load test and run on a remote rig, you must consider how the individual agent computers use the bound data. For example, when the access method is sequential or random, each agent gets a complete copy of the data that is shared by all virtual users created on that agent. However, when the access method is unique, the data is divided among the agents.

You must also consider the location of the data source if you are using a text file as a data source. If you hard code a directory path, for example c:\datafolder, at design time, the text file will have to reside in c:\datafolder on each agent computer at run time. It is recommended that you create data sources on network shares. Creating data on network shares allows you to reuse this data in other Web tests, share this data with other testers, and use this data in a load test on a rig more easily.

Related Sections

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.