Groups

Combine several steps into a group and start making use of reuse!

"Reuse" is one of the more basic principles of programming. Instead of copy-pasting the same twenty lines of code over and over, you write them ONCE inside a method and call it whenever you need to.

This principle works precisely the same in the world of automated testing, by grouping steps together and then making these groups available to be called from other tests in your project. Even if you don’t share groups between tests, you can still improve the organization of your tests, by using them to reduce the number of steps presented in the Visual Editor.

In addition to sharing groups, there are some steps that can be shared without the need to group them with other steps. For more information, see Shareable Steps.

Creating a Group

To create a group:

  1. Select multiple steps by holding the Ctrl (windows) or Command (mac) key while left-clicking on the steps, OR marking an area around the steps.
  2. While the steps are selected, click Add Group.
2140
  1. In the Group Name field, enter a name for the group.
  2. If you want to make this group available to other tests in your project, select the Shared Group checkbox.
  3. If you want to enable Auto-Grouping, select the Apply auto group on matching steps checkbox and follow the instructions in Auto-grouping.
  4. Click Confirm.
    The steps are grouped into a single group step. If the group is shared between tests, a Shared indicator icon is displayed.

  1. To view the individual steps within the group, double-click the group.

Specifying Group Properties (optional)

On the Group Step, click the Show Properties () icon to open the Group Properties pane.

PropertyDescriptionComment
Shared step nameThe name of the group.Changing the name will modify all instances.
DescriptionThe group’s description.Can be different for each instance of the group.
Replace with cloneCreates a copy of the group that can be modified without modifying the other instances.
ParamsSee - Parameters for groupsChanging the name will modify all instances.
When this step failsWhat occurs if the group step failsChanging the name will modify all instances.
When to run stepCreates a breakpoint where a condition can be specified when to run this group step.
To learn more about Conditions, see -
Conditions
Changing the name will modify all instances.
Repeat groupCreates a loop based on conditions. To learn more about loops, see -
Loops
Changing the name will modify all instances.
ContextAssigns entire groups to different elements of the page and across pages. To learn more, see -
Group context
Can be different for each instance of the group.

Reusing a Group

You can reuse a group within the same test and if the group is a shared group, you can reuse it in other tests within your project.
To reuse a group within the same test:

  1. Hover over the > (arrow symbol) between the two steps.

The action options are displayed.

519
  1. Click on the folder (Shared steps).
    The Shared steps menu opens.
719
  1. Click the group name to add it as a new step.
    The group is added as a step in the Editor.

📘

You can use the search box to help you find your group.

  1. If the step expects you to pass parameters, don't forget to assign them by editing the param values (to learn more, see Parameters section). Each step passes its own parameters (e.g. you could call the "login" with "David" as params in one test, and with "John" in another).

📘

Note

It is also possible to copy/cut and paste the group. See Editing Tests.

To reuse a group in another test:

  1. In the other test, hover over the > (arrow symbol) between two steps, or the + (plus symbol) after the last step.

The action options are displayed.

696
  1. Click on the folder (Shared steps).
    The Shared steps menu opens.
719
  1. Click the group name to add it as a new step.
    The group is added as a step in the Editor.

📘

You can use the search box to help you find your group.

Modifying Groups

You can modify an existing group and if this is a shared group, the modification will apply across all tests that use the group.

📘

Note

if it's a shared group, but you don’t want the changes to apply to the other tests, you can use the Replace with clone feature and then modify this group only.

To modify a group:

  1. Access the group details, by doing one of the following:
  • In the test that includes the group, double-click the group step.
  • If it's a shared group, you can go to Test List > Shared Steps, hover over the group and click See all tests using this shared step. Click one of the tests in the list and then in the test, double-click the group step.
  1. In the group details screen you can modify the test by:
  • Recording additional steps at the beginning/end of the existing steps - to add additional steps, you will need the have the AUT opened in the state of the last step (before adding the new steps). To do that, you need to:
    • Specify a breakpoint in the last step (before the new steps)
    • Run the test again.
    • stop the test.
    • Go into the Group Details and begin recording the new steps as shown below.

  • Recording additional steps in the middle of the existing steps. - you will need the have the AUT opened in the state of the last step and then record the additional steps as shown below:

  • Reordering or deleting steps - you can reorder the steps by dragging them to the desired location. Delete steps by selecting them and then pressing DELETE.

📘

Tip

After modifying the group you may want to change its name in the Properties pane to reflect its new functionality.

  1. To get back to the test either click the Back button or on the name of the test on the top left.

Removing the reuse option

You can remove the reuse (share) option from a group without deleting it. This does not delete it from the existing tests, just removes the option to reuse it and add it to tests again.
To remove the reuse option:

  1. Go to Test Lists > Shared Steps
  2. Select the group
  3. Click the Hide button, either from the top menu or the context menu
    This will hide the selected shared step(s) from the shared library. Steps that have already been used in your tests will not be affected.

Changing one instance of a Shared Group by replacing it with a clone

Changing shared group in one place will change it in all instances of the branch. Although you can send different parameters to different instances of the shared group, sometimes you need to make changes only in a specific instance (i.e. in a specific test). For this purpose, you will want to clone the group.

To clone a group

  1. Edit the shared group that you wish to clone.
  2. In the Properties panel, click Replace with a clone.

  1. Enter a new name for the group.

  1. Decide whether the new step will also be defined as shared.
  2. Click Confirm.
    The group and all its steps will be cloned. Shared steps and nested steps will remain shared.