Step Group for the beginning of a Scenario
When to use
This is useful when you want to run the same process at the beginning of multiple scenarios. Generally, we find users use this type of Steps Group for logins or quick navigations.
Creating a Step Group for the beginning of a Scenario
Creating this kind of Step Group is very similar to creating a scenario. Click on the [Step groups] tab to navigate to the step groups page.
For our purposes, we will click the "New" button at the top right corner.
This interface should be familiar as it is the same as that of a scenario. You can change the name of this step group by clicking the edit button. You can also change your window size (note: make sure you have the same window size for both your scenarios and step groups to maintain consistency).
Input the URL you want to start with and then press "Start recording". From there you should be able to record your step group in the same way you would record a scenario (see recording a scenario for more information).
Creating a Step Group from an existing Scenario
While you can record your Scenario from scratch, you may also want to create a Step Group from a existing Scenario. It's possible, and easy!
- Click the three dots menu in the upper right corner of the Scenario Details Page
Duplicate as a Step Group.
- If the Scenario begins with a Step Group, you cannot duplicate it as a Step Group.
- If the Data feature is used in the Scenario, the Data contents will not be included in the copied Step Group.
For more details, please refer to the following document:
Can I copy Scenarios as a Step Group?
Using a Step Group at the beginning of a Scenario
When creating a new scenario, you can instead select "Using step group" to start the scenario with the step group you recorded.
Upon clicking this you will be given a dropdown to select from a list of step groups you have made. Select the one you would like to use. If you would like to proceed automatically to the end of the step group, keep that option checked. Press record and now you can continue as normal with your scenario!
Once you have finished recording your scenario, the step group will appear at the beginning of the scenario. You can replace it with some other Step Group by selecting it from the list. If you have a long list of step groups, you can easily find the one you are looking for by typing the name into the field.
If you have a preexisting Scenario you would like add this step group to, you can do so by going to step 1 of that scenario and change “visit” to “execute step group”.
Please note, that when running a test with a Step Group in it, the number of steps in the result will include the number of steps in the Step Group.
Next Section: Step Group for the middle/end of a Scenario