Shared group steps are group steps that can be reused in all of your scenarios. If you find yourself recording similar steps across scenarios, such as login steps, or repeating actions within the same scenario like a set of assertions on an element that changes state, consider using a shared group step. Shared group steps decrease your workload while making your scenarios easier to maintain.
This document explains how to create, configure, and use shared step groups in Autify Nexus.
Creating a shared group step
You need to have first created a normal group step in order to turn it into a shared group step. In the scenario editor:
Navigate to the group step
Click its three-dot menu
Click Create shared group
Configure the settings (see Shared group step settings)
Click Done
Configuring a shared group step
Shared group step settings
The following settings can be configured when creating or editing a shared group step.
Group name
The name of your shared group step. This is a required field that will serve as the step’s name in the UI.
Parameters
Parameters represent values that can be used by the steps within the group. Any parameter added to a shared group step will be available to all instances of that shared group. For example, adding the parameters username and password to a shared group step would allow you to set different usernames and passwords per instance of your shared group step. See Setting parameter values for more information.
Editing shared group step settings
Once a shared group step has been created, you can edit its settings by clicking its three-dot menu and clicking Edit.
Except for enabling/disabling or setting parameter values, changes made to a step group’s settings will apply to all instances of the step group used in your scenarios.
You will be warned about any impact to all instances of your step group when saving your changes.
Editing steps within a shared group step
Any modification to a step inside a shared group step, even its order, will change all instances of that shared group step.
You will be warned about any impact to all instances of your step group when saving your changes.
Using a shared group step
Adding a shared group step to a scenario
You can add a shared group step to a scenario by using the Insert step feature in the scenario editor.
Setting parameter values
You can set different parameter values for each instance of a shared group step. Changing the default value will affect all instances of the shared group step.
The parameter can be set to the following values.
Name | Description |
|---|---|
Given value | Used to override the default value of the parameter. |
Data | Used to set parameter value from values in the scenario’s data tab. |
Other step’s output | Used to set parameter value from another step’s output within the scenario. |
Default value | The default parameter value used by all instances of the shared group step. |
Deleting a shared group step
You can delete a shared group step from the shared group step menu via Insert step. A shared group step can only be deleted when it is not being used in any scenario.
Reverting to a regular group step
The option to revert a shared group step to a regular group step is called “Detach group.” Once you detach a shared group step, changes made to it will not impact any other group step, and it will no longer have access to any parameters that may have been set.
You can detach a shared group step, do one of the following:
On the scenario editing screen, click the three-dot menu of the target shared group step, and click Detach group.
On the scenario editing screen, click the three-dot menu of the target shared group step, click Edit, and then click Detach.
Important notes
Cannot refer to return values (Result of other step)
You cannot refer to the Result of other step of a substep within a shared group from outside the shared group (the main scenario). If return values were accessible from the outside, maintaining the shared group step (such as adding or deleting steps) could unintentionally break scenarios that use the group. Within the shared group, you can refer to the results of preceding steps.
Similarly, you cannot refer to return values located outside the shared group (the main scenario) from within the shared group.
Cannot use random email addresses directly
If you want to use a random email box within a shared group, design it so that a Parameter is prepared in the shared group and passed from the calling scenario. When using a shared group step containing a random email address across multiple scenarios, if a shared group parameter is not set, you must re-specify the random email address for each scenario.
Cannot use data directly
When editing a step within a shared group, Data and Shared Data are not displayed as input value types. If you want to use values derived from data, design it so that a Parameter is prepared in the shared group and passed from the calling scenario.
Handling file uploads
Because files are resources tied to a scenario, files are not bundled with the shared group itself. If there is a file upload step within a shared group, it is assumed that the required file has already been uploaded in the calling scenario. If you want to use different files, pass the file identifier using a Parameter.
Prohibition of circular references
Shared groups can be nested, but configurations that cause infinite loops through self-reference (direct and indirect) are not allowed. If a circular reference occurs, a runtime error will happen, and the test will fail.