Incrementing Variables

Incrementing Variables

Incrementing means to change the value of a variable to a new value, based on a strategy that you can specify. Incrementing variables lets you make your scripts run for many different values of a variable.

To cause a variable to be incremented as part of your script, drag an Increment item from your Toolbox to the place in your script where you would like the increment to occur. The diagram below shows how an Increment looks in your script:

Increment Strategies

The new value assigned to a variable depends on the "strategy" you choose for the Increment. The default strategy that Badboy uses works like this:

  1. Look for the next value from the variable's value list (see Variable Value Lists)
  2. Look for the next value from an ODBC Data Source set by the user (see Using Data Sources)
  3. If neither of the above is present, a random value will be generated for the variable using the current time and the id of the thread which is running the Badboy script.

If you wish, you can control exactly how Badboy increments the variable by setting the properties of the increment item. The table below shows the different strategies that you can assign and explains how they operate:

Strategy Description
Default A combination of the "List Value" and "Random Integer" strategies. If the variable has a value list then it will use the "List Value" strategy, otherwise it will use the "Random Integer" strategy.if it has one.
Random Integer Appends a random integer based on the thread id and current time to the variable's current value, replacing any other numeric characters at the end of the value. For example, "treefrog1" might become "treefrog65267"
Value List Uses the next value in the variable's value list. The value list might have been assigned by a Variable Setter, or it might come from an ODBC data source, or it might have been manually set by the user. (see Variable Value Lists)
Sequential Integer Adds 1 to the value of the number at the end of the current value. For example, if the current value is "treefrog1", then incrementing would make it "treefrog2".

Badboy Documentation Generated on Mon Dec 29 22:28:41 EST 2008