title | metadesc | noindex | order | page_id | warning | contextual_links | |||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Test Step Type: Step Groups |
Instead of writing the same steps repeatedly, you can create a step group and use it in the test cases when required. This article discusses how to use step groups in Testsigma |
false |
4.23 |
Test step type: Step groups |
false |
|
Sometimes, a group of steps is common to multiple test cases.
For Example:
- You must log into an account before performing a fund transfer.
- You must log into an account before deleting a beneficiary account.
- 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.
-
Navigate to Create Tests > Step Groups, click on Create Step Group.
-
Enter Name and create steps manually by clicking on Add new step.
Alternatively, you can click on Record to record steps for the step group.
- After adding all the steps, you can use the step group in any test case.
[[info | 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. | | - Enable the Data Driven toggle. | | - 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.
[[info | NOTE:]] | The changes will affect all the test cases that use the step group.
-
Click on the Test Case in which you want to edit the Step Group.
-
Click on the Step Group to edit any test data or element being used in the step group.
[[info | 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.
-
Navigate to Create Tests > Test Cases and hover over the test case from you want to create a step group and click on it.
-
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.
-
This will open a pop-up as below:
- 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.
[[info | NOTE:]] | If you don't select consecutive test steps then the pop-up that appears won't show you the Create and Replace button. |
-
Navigate to Create Tests > Test Cases. Either click on Create Test Case or hover over the existing test case and click on it.
-
On the test case details page, click on the option on the left side of the test step and select Step Group.
-
From the Step Group list overlay, select the step group you want to add.
[[info | 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.
- 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:
- 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):