This article explains how to work with flows in the mabl Trainer.
How to create a flow
In the mabl Trainer, take the following steps to create a new flow:
- Click on + (Add step) > Create a flow.
- Give the flow a name. If you want to add parameters, add them in the Parameters tab. If you want to create a loop, set the looping value in the Looping tab.
- Click OK.
- With the Trainer cursor inside the flow, record the test steps that you would like to include in the flow, such as clicks, assertions, or conditionals.
If you are adding a flow within another flow, make sure the Trainer step cursor is positioned inside the parent flow before adding.
In addition to starting with the Trainer step menu, you can also create flows through drag-and-drop and bulk-edit actions.
Drag and drop flow
- Record the test steps that you would like to include in the flow.
- Create a new flow: + (Add step) > Create a flow.
- Drag and drop the Start flow and End flow steps so that they wrap around the test steps you want to include in the flow.
Bulk edit flow
- Record the test steps that you would like to include in the flow.
- For each step that you want to include in the flow, hover over the step number and check the checkbox that appears. When you start checking steps, a bulk edit menu appears at the top of the Trainer window.
- Click on the Create flow button in the bulk edit menu.
After you save the test, you can import the flow into other or reuse the flow in the same test.
How to import a flow
Flows are test-type and platform specific. When you save a new flow, you can import the flow into other tests of the same type: browser, mobile Android, or mobile iOS.
In the mabl Trainer, take the following flows to import an existing flow into a test:
- Click on + (Add step) > Flows.
- Search for the flow by its name.
- Select the flow.
- If you import a parameterized flow, the Trainer prompts you to add any overrides you’d like to that instance of the flow. Overrides do not impact other instances of the flow in different tests or even the same test.
- Click Import flow.
Importing a flow
How to edit a flow
Any user with an editor or owner role in your workspace can edit flows.
To edit a flow, open a test that contains the flow in the mabl Trainer. Move the Trainer cursor inside the flow to record and modify steps as needed.
Note
Editing a flow in one test updates the flow across all tests that use it. If you want to keep your version of a flow separate from other versions, save the flow to a branch.
How to remove a flow
To remove the flow and all of its steps from the test or parent flow, click on More actions (....) for the Start flow step and select Remove flow. The flow will remain available in the workspace.
How to customize flow steps for a single test
If you want to edit a specific instance of a flow without affecting the other tests that use it, click on the trash icon for the Start flow step before editing the flow step.
Deleting the Start flow step converts the flow steps into inline steps:
- In a standalone flow, those steps become non-reusable test steps.
- In a nested flow, those steps become steps in the parent flow.
Deleting a Start flow step to customize steps for a single test