Test Step Type: Step Groups


Sometimes, a group of steps is common across multiple test cases.

For example:

  • You must log in to an account before performing a fund transfer.
  • You must log in to an account before deleting a beneficiary account.
  • You must log in to an account before downloading an account statement.

Logging in to an account is a common prerequisite. Instead of duplicating these steps in each test case, you can create a step group and reuse it wherever required. This article describes how to create and use step groups in Testsigma.


Create a New Step Group

  1. From the left navigatio bar, go to Create Tests > Step Groups, click Create Step Group. Create Step Group
  2. Enter Name and create steps manually by clicking Add new step. Name & New Step

    Alternatively, you can click Record to record steps for the step group. Alternate Method

  3. After adding all the steps, you can use the step group in any test case.
NOTE:

You can also create a data driven step group by associating a test data profile from the step group settings. Follow the steps below to associate a test data profile.

  1. Create a step group and click Step Group Settings.
  2. On Step Group Settings,

    • Select the Test Data Profile you want to associate with the Step Group. Test Data Profile
    • Enable the Data Driven toggle. Data Driven
    • Now, create all the steps and your data-driven step group will be ready to use across test cases.

Edit a Step Group

  1. From the left navigatio bar, go to Create Tests > Step Groups.
  2. Open the step group you want to update and make the changes.

    NOTE:

    The changes will affect all the test cases that use the step group.


Delete a Step Group

  1. From the Step Group list page, click kebab menu next to the step group you want to delete and click Delete. Delete
  2. This will open Deletion Warning popup. PopUp

    NOTE:

    This will show the list of affected test cases. Deletion of the step group will remove the step group in the linked test cases.

  3. Enter DELETE and click I understand, delete this Step Group. Delete
  4. The step group will be deleted successfully.

Edit a Step Group for a Specific Test Case

  1. From the left navigatio bar, go to Create Tests > Test Cases.
  2. Open the Test Case in which you want to edit the Step Group.
  3. Expand the Step Group to edit any test data or element being used in the step group. Edit Step Group
  4. After updating any step click Update Step to save the changes. Save Changes
NOTE:
  1. You can edit test data and elements for specific test cases but not the NLP.
  2. Edits made for a step group within a test case do not affect the original step group.

Create a Step Group From a Test Case

  1. From the left navigatio bar, go to Create Tests > Test Cases.
  2. Open the Test Case from you want to create a step group.
  3. Once you start selecting the test steps, an option bar will appear on top of the test steps. Select all the steps you want in a step group and click on Create Step Group. Create Step Group
  4. This will open a pop-up as below: Create

    • If you click on the Create, a new step group with the selected test steps and the given name would be created.
    • If you click on the Create and Replace button, a new step group with the selected test steps and the given name would be created and the selected test steps would be replaced by the created step group.
NOTE:

If you don't select consecutive test steps then the pop-up that appears won't show you the Create and Replace button. Only Create


Use Step Group in a Test Case

  1. From the left navigatio bar, go to Create Tests > Test Cases.
  2. Expand a Feature, then expand a Scenario, and click ‘+’ next to the scenario where you want to add the test case or open a Test Case in which you want to add a step group.
  3. On the test case details page, click the option on the left side of the test step and select Step Group. Add Step Group
  4. From the Step Group list overlay, select the step group you want to add. Step Group Overlay
  5. Click Create Step. Create Step
NOTE:

You can also add a data driven step group to a data driven test case. This allows iterating through multiple data sets via the step group for every single iteration of your data-driven test case.


Use a Step Group Between Projects

  1. From the left navigation bar, go to Create Tests > Test Cases.
  2. Expand a feature, expand a scenario, and click + next to the scenario where you want to add a test case. Alternatively, open a test case in which you want to add a step group.
  3. On the test case details page, click the option icon next to the test step, and then select Step Group.
  4. In the Step Group list overlay, click Reuse Step Group. Reuse Step Group
  5. In the Reuse Step Group dialog:

    • Select the project, application, and version.
    • Select a step group from the Reuse Step Group dropdown list. Reuse Step Group Details
  6. Click Create Step. Create Step
  7. The step group is added from the selected project.
ADDITIONAL INFORMATION:

Step groups reused across different application types may contain element locators that do not match the target application. Verify and update the locators before executing the test case.

Additional actions possible on iteration count

  1. Store: In a step group, when a test data profile is being iterated - an additional action is possible. The iteration count can be stored into a variable for later use. (Iteration count is the current count that is being iterated over the associate test data profile in the step group in Testsigma.) Below is how the syntax for the Store NLP looks like:

store-iteration-count-test-data-set-name

  1. If: The test data set values, from a test data profile being iterated, can be compared within an if condition too. Below screenshot shows the NLP (The NLP can be added as a part of add-on String Compare. You can find the add-ons to use here: https://testsigma.com/addons):

the verify if NLP that is available with the addon String Compare