How to Databind Web Test Properties that don't have the Databinding Dropdown UI in the Property Grid
Most of the time when you want to bind a web test, request, validation rule, or extraction rule property to a datasource you just click on the value in the properties grid and there is a dropdown that provides UI for selecting the datasource to bind to. Sometimes you'll find properties that don't provide this UI but you'll want to databind the value anyways. In most cases this it's possible, here are an easy set of steps to do this:
- Add the datasource that contains the dynamic values you want to bind to the property.
- Add a Querystring parameter to one of the requests in your Web Test, it doesn’t matter which one, we’re going to delete this when we’re done.
- Bind the Querystring parameter to the datasource in the way you’d like to bind the property value that doesn’t have this binding UI.
- Look at how the querystring value looks in the editor after binding, it’ll be something like: {{datasourceName.tableName.fieldName}}
- Type that exact text, including the surrounding {{ }} into the value’s text field where you want the real binding.
- Now you can delete the querystring parameter you added.
That’s it, you should be able to databind just about any property in the grid that doesn’t have the databinding UI by default using this method.
Comments
- Anonymous
July 21, 2008
Visual Studio Team System for Testers Content Index for Web Tests and Load Tests Getting Started Online