Some LoadView test may require you to provide some variable data that will be used in the tasks of your device. For example we want to simulate different users logging in or visitors searching for different products. To achieve this you need to set up Context Parameters and provide a list of values that will be used during the LoadView test.
Setting up context parameter for http/https test
- Open the task for editing, scroll down to the Additional Parameters section and open it up.
- For the Get, Post Parameters or Headers in the action button select New Context Value.
- Confirm the change for the selected Parameter or Header in a confirmation message that will appear.
On the screenshot the _username post parameter is now going to take the value out of the Context parameter (variable) named _username.
Setting up context parameter for multi step browser test
Record a script first. Stop recording and Play the script.
- Click on one of the methods SelectByText, TypeText or GoTo in the script area of the Every Step Scripting tool.
- In the properties panel on the right click on the dropdown next to Text.
- In the dropdown click on Convert to context parameter link.
- In the dialog provide a name for the Context Parameter and select Parameter type String & Hidden value or String Value. String & Hidden value can be used to mask a password or other sensitive information.
View this in action along with the process of uploading values in the EveryStep Scripting Tool – Advanced Guide video: Watch Now
Viewing context parameters
If the device has Context Parameters you can find a list by going to the device edit screen where you will see the list of Context Parameters.
For the multi-step browser test, you can also view a list of Context Parameters in the Every Step Scripting tool. In the top left corner of the script area select Context Values from the dropdown.
Uploading Context Parameter values to the LoadView test
You can only upload values for the Context Parameters if they’ve been previously set up.
- Create a CSV file with the Names of the Context Parameters as column headers and each row being a set of values for those Context Parameters.
Or you can download a preconfigured template from the stress setup page in the Dynamic Variables accordion by pressing a csv template link.Make sure that the number of values (rows) in the CSV is the same or more than the Max number of users you LV test is set up for. Values do not have to be unique.
- Upload the csv file on the test set up page by clicking the Upload Dynamic Variable CSV button.