Parameters
Parameters are centrally defined variables that can be accessed by both Keywords and Plans in Step. They offer several key capabilities:
Scope Assignment: Parameters can be assigned to specific scopes, restricting their visibility and access to certain applications or keywords. Protection of Sensitive Parameters: Sensitive parameters can be protected to hide their values from users, ensuring secure handling of critical data. Activation Expressions: Parameters can be dynamically assigned or mapped to specific environments, users, or other conditions using activation expressions.
Parameters definition
- Key : The parameters key is used as a non-unique identifier. If multiple parameters share the same key, its Priority defines which one is taken
- Value : The value can either be a String or a dynamic value. Note: dynamic values can’t be protected
- Scope : defines the entity that has access to the parameter read more
- Global : accessible by all Keywords
- Application : accessible by keywords registered to a given application
- Keyword : accessible only by the specified Keyword
- Activation script : a Groovy boolean expression can optionally be used here to enable the parameter value dynamically. The following bindings are available for use in activation script. read more
- user : the currently logged in user
- screen settings : any defined screen settings can be used via ID
- Priority : indicates the priority rating for the activation scripts. Activation scripts with the highest priority rating gets evaluated first.
Create new parameter
To create a Parameter, click Parameters on the sidebar menu, then click the Add new (+) button as shown on the following screenshot.
Fill in the Key and Value fields, make sure to leave the scope as “Global”, confirm with Save.
Note: To simplify the process of creating multiple parameters, we’ve introduced the “Save & Next” button, allowing users to quickly create a new parameter with all inputs pre-filled from the previous one.
You can now use the Parameter in any of your Plans or Keywords as shown in the following screenshot:
Dynamic value
Dynamic values use groovy expressions to dynamically set the value, this can include referencing other parameters or environment variables.
Use activation script
Activation scripts can be used to have different values for the same key depending on the evaluation of a groovy expression. As an example we can set a parameter “log” based on the “environment” setting. In the following screenshot, we created the “log” parameter twice with different activation scripts for each environment:
- “TEST” environment execution sets the parameter value to “Debug”
- “PROD” environment execution sets the parameter value to “Error”
Use prioritized activation script
The Priority is used to select the used Parameter in the case that multiple Parameters with the same key exist. In the following screenshot, we defined the “log” value to be Error for both environments with a higher expression priority than the one set for the “Test” environment only.
The expected outcome is that on each environment, the log level will be set to Error.
Use other scopes
When creating or editing a parameter you may assign it to a given scope to specify its access.
Application scope
To enable Application scope, you’ll have to add a new entry in the entity model for keyword. You may refer to the customization section. The new entry must have the ID “attributes.application” as shown in the following screenshot.
Note : The scope application is only available if applications were configured in the screen settings as illustrated in the following screenshot:
Keyword scope
The following screenshot shows how to create a parameter accessible by a specific Keyword.
Protected parameters
You can select “Protect parameter value” when creating or editing a parameter to protect its value. This means that the value will get obfuscated in the UI and in the exported data. After protecting a parameter it is not possible to remove the protection in order to maintain its security.
Note: If you name a parameter with a name containing either “pwd” or “password” the protection will be preselected but can be manually deselected before saving.
Encryption manager
From release 3.16, Step Enterprise features an encryption manager which further secures parameters. When enabled, the values of the protected parameters get directly encrypted at creation and update times. The values are decrypted during Keyword call.
To activate the encryption manager, contact your Step administrator. You can also refer to the page dedicated to the encryption manager for details.
Parameters table view
The parameters table view lets you manage existing parameters. It also lets you track activities like the last modification time and the user.