Badboy Automated Test tool 6 Variable Setter
In the previous section, we learned to manually add values to the Variable list. Badboy provides the Variable setter tool, which uses 3 ways to fill the list data.
We then use lashou's script to complete the learning.
1. Drag Variable Setters from Tools Tab into the script
2. After dragging, the configuration window of variable settings will pop up, as follows:
3. Select the variable Searchcontent to act on
4. Choose how to fill variables:
.1 Fixed value mode: values separated by commas
.2 Regular expression method
.3 Reading CSV files
In this section, we will use the first method, fixed value.
5. In the Fixed values text box, type mtv1,mtv2,ktv1,ktv2
6. Click OK
7. Run the script again, Play All
8. The first time you run the result, instead of mtv1, it will be ×× or MTV. This is because Variable has a configuration with a current value. The second response will point to mtv2. To avoid this trouble, you need to specify the current value of Searchcontent variable before running the script. Select mtv1 and click Current.