Prior to v5.0, when a parameter was databound to a dataset, the databinding method is specified on that parameter level (as described here). Starting in v5.0, databinding can also be defined on the dataset level.
The key benefit to databinding on the dataset level is that it is easy to change the databinding mode of all parameters in one place, instead of deleting and recreating all parameters as required in the previous versions.
Default databinding mode
The default databinding mode can be changed in the property grid below the dataset.
There are available three modes:
All are described here.
Create parameter with default databinding
When creating a parameter using a dataset with default binding, in the variable picker, select the column name to bind to. You do not have to select the databind method as described here.
When the parameter is created, the databind method will say Dataset, which means the default dataset binding will be used for this parameter.
Override default databinding mode
To override the default databinding method (or go back to the previous version of creating parameters), you have to set the Hide advanced databinding selection property to No.
That will show all available databinding methods in the variable picker.
On-Demand VU binding
VU-bound and VU-Iteration-Bound both by default use the VU number to calculate which dataset row will be bound to a particular parameter. The advantage of this approach is that it is known ahead of time, which record will be used for which VU and which iteration.
Imagine a test with 2 test cases (TCA and TCB), and a particular dataset is only used for TCA. Since VUs are distributed between TCA and TCB in round-robin order, the VU numbers of VUs running TCA are not sequential. Therefore the dataset needs to be padded with dummy data for TCB that will never be used. So the datasets must have a sufficient number of records for VUs in all scripts, including those that do not use it.
In order to fix this problem set the VU-to-row mapping property to On-Demand
This will assign rows to parameters on a first-come basis in run-time on-demand only for VUs that actually require databindin. So in the example above, the dataset doesn't need to be padded with dummy data.
However, since the rows are assigned on-demand, there is no way to tell ahead of time which row will be assigned to which parameter.
- No labels