Changing values for reusability

You can reuse a trace or a routine with different values by using parameters. For example, if you have a login routine but you want to use it with to test different users, you can change the credentials with parameters.

Currently trace parameters can be set via API. This how to is for setting routine parameters.

See how to create routines under reusability.

See how to access parameters in Javascript using variables.

Set parameters for a routine

1. Open parameter settings for a routine step

Click the “parameters” tab of a routine step.

2. Select parameter you would like to set

Pick the parameter name and the value you would like to set.

The list shows all the parameters available for this routine. You can set the value for multiple parameters by selecting them one by one from the list.

To change the names of the parameters listed here see Change step’s parameter name & default value.

3. Set a value to a parameter

You can overwrite the default value by changing the “Value” field for the parameter. You can also overwrite the parameter’s name when having nested routine steps by editing “Parameter name” field.

Change step’s parameter name & default value

Modify a step’s parameter name to make it more understandable when setting it in a routine step. You can also edit the default value of your parameters.

1. Open the trace with the wanted step

Select a routine step in the trace.

2. Open the parameters tab of the wanted step

Click the “parameters” tab of the step to open up the parameter settings.

3. Change the step’s parameter settings

The field “Parameter name” is the settings name that you set the value for when using the routine from this trace. See Set parameters for a routine. The default name for the parameter is generated by Usetrace.

The field “Default value” is the value used when no parameter has been set.