0% Complete

Introduction

This lesson is made to help you understand and utilize Flows in your tests.

Before taking this lesson

Make sure you are comfortable with the following lessons:

  • mabl App Intro
  • mabl Trainer Intro

Learning Objectives 🧠

To understand:

  • What Flows are
  • How to use them on a basic level
  • Why they are valuable to your testing

Key Benefits of Flows💰

  • Easier test management and organization
  • Increased test scalability
  • Faster test creation

Common Flow Use Cases 👍

  • Logging in/Logging out of an application
  • Filling out a form
  • E-commerce checkout process

Why is this important?

The DRY Principle

DRY = Don't Repeat Yourself

"...a principle of software development aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy."

In all testing, there is repetition -- performing actions from scratch over and over will lead to increased time, effort, and maintenance in your testing.

Therefore, as testers, we need an efficient way to:

  1. Make repeated actions reusable
  2. Edit them in bulk when app changes occur

Avoid repeating yourself by using Flows!

Quote from: Foote, Steven (2014). Learning to Program. Addison-Wesley Professional. p. 336.

What is it?

A grouping of reusable steps that accomplish a specific action.

What can you do with Flows?

- Import into any other test that needs to accomplish the same action

- Import into the same test multiple times

- Edit all instances of a flow by making changes to a single flow

- Parameterize with data inputs

- Loop through a specified number of times

(Learn more in this lesson on Looping)

Here comes the learning! 🤓

Getting started

3 Basic Flow Functions

  1. Create basic Flows:
    1. Recording new steps
    2. Converting existing steps
  2. Parameterize Flows:
    1. What they are
    2. How to configure them
  3. Reuse Flows:
    1. Import a basic Flow
    2. Import a Parameterized Flow

We will showcase each using a login example…

 

Create basic Flows

Record new steps

  1. Navigate to more actions
  2. Select Flows dropdown
  3. Select New Flow
  4. Give the Flow a name (Make it clear and specific to the action being performed)
  5. With recording on, begin recording the steps of the Flow

    ✅ Best Practice: Include Assertion as the last step

  6. When finished move the cursor after the purple 'End Flow' step to continue on with the test

Convert existing steps

  1. Identify an existing group of steps that you would like to create into a flow
  2. Select each using the checkboxes on the left of the step
  3. Click the 'Create Flow' button (far right above the save button).
  4. Give the Flow a name
  5. Rock on 🤘

Parameterized Flows

image (17)

What are they?

A parameter is a variable that exists only inside a Flow, and allows you to control what data is used within that particular Flow.

Here are some facts about Parameters:

  • Every parameter has a name and a default value, which are synced with the Flow.
  • A parameter's value can be overridden to change the data that the Flow uses. Overrides are unique, such that multiple instances of the same Flow can all use different values.
  • Without parameters, a Flow will do the same thing each and every time it is executed.
  • You can draw in data tables with them (see Data tables lesson)

How to configure them?

  1. Follow the same steps as the previous "Create basic Flows: Record new steps" *create hyperlink*
  2. Select Parameters
  3. Input variable names and default values
  4. Begin recording Flow, using the corresponding parameters as variables where necessary
  5. You can configure parameters at any time when you click the pencil icon to edit the Flow

Reusing Flows

Importing a basic Flow

  1. Navigate to more actions
  2. Select Flows from the list
  3. Click on Import Flow
  4. Search for the Flow by name, select it, and click Import Flow
  5. If you'd like to make changes, click the left arrow to expand the Flow, otherwise move the cursor after the Flow step, and forge on! 🛠

Import a Parameterized Flow

  1. Follow the steps to import a basic Flow
  2. To override the default values: enter new values into the fields
  3. To maintain the default values: do nothing and click done
  4. Confirm that the correct values are being used by playing the Flow back, and if you're all set, onward! ➡️

Best Practices

Trainer Tips

  • Expand & collapse by clicking the arrow to the left of 'Start Flow' step
  • Return steps to normal by clicking the trashcan icon - this will maintain the recorded steps, but remove the Flow
  • Edit the properties of a Flow (name, parameters/looping configuration) by clicking the pencil icon
  • Access faster navigation options by clicking 'More Actions' on the right of 'Start Flow' step
  • Delete Flow AND steps entirely by navigating to 'more actions', then clicking 'remove flow

Web App Tips

  1. Accessing Flows

    • Go to the Tests tab
    • Click on the Flows section
    • From here you can search the list, see what tests they're used in, and remove them if needed.
  2. Managing Flows

    • Click on the name of a Flow to summary details
    • View tests using the Flow
    • Check out the version history, and roll back to previous versions if needed

Recap

Summary

  • What Flows are
  • How to use them on a basic level
  • Why they are valuable to your testing

What to do from here

  • Make repetitive actions reusable, saving time with test creation
  • Edit multiple tests simultaneously, reducing maintenance costs
  • Control how data is used for different test cases, expanding test coverage with less resources

Feedback

Was this helpful?

Take this 2 minute survey to let us know how we can make mablU better!