Moropo
RoadmapTerms
  • Welcome to Moropo
  • Quick Start
  • Uploading your app
    • Producing an Android Build
    • Producing an iOS Build
    • Uploading Your Build To Moropo
  • Creating Tests
    • Using the Test Creator
    • Test Configuration
    • Test Step Commands
      • addMedia
      • assertNotVisible
      • assertTrue
      • assertVisible
      • back (Android only)
      • clearKeychain (iOS Only)
      • clearState
      • copyTextFrom
      • doubleTapOn
      • eraseText
      • evalScript
      • extendedWaitUntil
      • hideKeyboard
      • inputRandomEmail
      • inputRandomNumber
      • inputRandomPersonName
      • inputRandomText
      • inputText
      • launchApp
      • longPressOn
      • openLink
      • pasteText
      • pressKey
      • repeat
      • runFlow
      • runScript
      • scroll
      • scrollUntilVisible
      • setLocation
      • startRecording
      • stopApp
      • stopRecording
      • swipe
      • takeScreenshot
      • tapOn
      • travel
      • waitForAnimationToEnd
    • Test Step Selectors
    • Importing From Maestro
    • Environment Variables
      • ${BUNDLEID}
      • ${EXPORELEASECHANNEL}
      • ${MOROPO_TEST_EMAIL}
      • ${MOROPO_EMAIL_URL}
    • Advanced Use Cases
      • JavaScript
      • Conditionals
      • Network Connection
      • Drag and Drop
  • Running Tests
    • Manually Trigger a Test Run
    • Scheduling a Test Run
    • Tags
    • Supported Devices
    • Test Execution Limits
    • Flakiness Tolerance & Retries
  • CI Integration
    • Initial CI Setup In Moropo
    • GitHub Action
    • Moropo API
      • Branches
      • Builds
      • Test Runs
      • Tests
  • Test Results
    • Results Explorer
    • Slack Reporting
    • Email Reporting
  • App Frameworks
    • Flutter
    • React Native
  • Guides
    • React Native Expo
    • Access Emails During A Test Flow
    • Git workflow using Moropo API
  • Infrastructure
    • IP Addresses
  • Security
    • Services Infrastructure
    • Security Best Practices
Powered by GitBook
On this page
  • Examples
  • Passing environment variables

Was this helpful?

Edit on GitHub
  1. Creating Tests
  2. Test Step Commands

runFlow

The runFlow the command allows you to run another test flow or sub-flow from the current flow.

This helps avoid repetition across your tests. For example, you can write a test for Login and then reference that test whenever your flow requires sign-in.

Not only does this provide less copy and pasting between flows, but it also means you have a single test flow to amend should the login user journey change in your app.

Examples

To run another flow configured in Moropo

- runFlow:
    file: My Login Flow.yaml   # name of the test in Moropo + .yaml

Use within your script

- launchApp
...
- runFlow:
    file: login.yaml
...

Run in-line commands

- runFlow:
    commands:
      - tapOn:
          text: "some text"
      - tapOn:
          text: "other text"

Run in-line commands (iOS only)

- runFlow:
    when:
      platform: iOS
    commands:
        - tapOn:
            text: "some ios specific text"
        - tapOn:
            text: "other ios specific text"

Run in-line commands (Android only)

- runFlow:
    when:
      platform: android
    commands:
      - tapOn:
          text: "some android specific text"
      - tapOn:
          text: "other android specific text"

Passing environment variables

- runFlow: 
    file: login.yaml
    env:
      SOME_KEY: "my value"

Last updated 1 year ago

Was this helpful?