Test Step Type: Step Groups


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

For Example:

  1. You must log into an account before performing a fund transfer.
  2. You must log into an account before deleting a beneficiary account.
  3. You must log into an account before downloading the account statement.

Here, logging into an account is a common step. So, instead of writing the same steps repeatedly, we create a step group and use it in the test cases when required. This article discusses how to create and use step groups in Testsigma.


Create a New Step Group

  1. Navigate to Create Tests > Step Groups, click on Create Step Group. Create Step Group
  2. Enter Name and create steps manually by clicking on Add new step. Name & New Step

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

  1. 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 on 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.

Here's a quick GIF demonstrating how to create a step group in Testsigma. Step Group Creation


Edit a Step Group

  1. Navigate to Create Tests > Step Groups. Step Groups
  2. Click on the step group you want to edit and make the changes. Edit Step Group
NOTE:

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


Edit a Step Group for a Specific Test Case

  1. Navigate to Create Tests > Test Cases. Test Cases
  2. Click on the Test Case in which you want to edit the Step Group. Test Case to Edit
  3. Click on the Step Group to edit any test data or element being used in the step group. Edit Step Group
  4. After editing click outside the 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. Navigate to Create Tests > Test Cases and hover over the test case from you want to create a step group and click on it. Test Case
  2. 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
  3. 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. Navigate to Create Tests > Test Cases. Either click on Create Test Case or hover over the existing test case and click on it. Test Cases
  2. On the test case details page, click on the option on the left side of the test step and select Step Group. Add Step Group
  3. From the Step Group list overlay, select the step group you want to add. Step Group Overlay
  4. Click on 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.


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