While creating a Web Application Task for the Stress Test one can provide some variable data that will be used in the tasks of the device. For example, this allows to simulate different users logging in, visitors searching for different products or dynamic URL testing by specifying dynamic variables.

As an illustration, consider testing of login page where multiple users have to logging in under different usernames. First, the script for a single user logging in needs to be created, and then Context Parameters for user login and password input in the script must be set up along with the list of dynamic variables (the set of logins and passwords for dynamic users simulation) in the test scenario.

To set up a Context Parameter for the script:

  1. Once the script is recorded, in the Script Code area, click the method which parameters you need to convert (TextField, TypeText, GoTo, etc.).
    In the case of logging in testing, we need to select the username and password input TypeText method to make a username/password variable in the script. 
  2. On the properties panel on the right, point to the input field header, click the action button  appeared in the header line, and then click Convert to Context Parameter. 
     
  3. In the dialog provide a unique Name for the context parameter or leave the default name. 
  4. If necessary, change the parameter value in the corresponding field. If you want to mask/unmask the value, point to the end of the Value field and click the appeared button. Hiding a value is useful to mask a password or other sensitive information while testing. Click Done.
  5. Click Save Changes. Your changes will be added to the script code.

You can edit Context Parameters on the corresponding tab of the script editing pan at any time.

When the script is saved and the device is configured the list of Dynamic Variables (Context Parameters values) must be specified in the test scenario. See Uploading Dynamic Variables to the Test Scenario for more details.

View this in action in the Stress Testing: Using Dynamic Variables video.