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
  • Step-by-step Guide
  • Is this secure?
  • Can I send multiple emails?
  • Does this work with SMS or text messages?

Was this helpful?

Edit on GitHub
  1. Guides

Access Emails During A Test Flow

How to use Moropo to dynamically access emails sent as part of an app testing flow

Last updated 3 months ago

Was this helpful?

This feature is currently disabled for new users. Please reach out to support@moropo.com to arrange enablement.

Note: this functionality currently only supports email addresses that Moropo dynamically generates during the flow. If you require support for access to pre-existing email addresses then please add your use case as a

This guide will show you how to access emails on the simulator as part of a Moropo test run.

Step-by-step Guide

Step 1: Use the ${MOROPO_TEST_EMAIL} variable as the email address in your flow

Moropo will automatically generate and populate this variable with a valid email address. It will be in the format of queue-123@parse.moropo.com

In script mode:

- inputText: ${MOROPO_TEST_EMAIL}

In step mode:

Step 2: Perform an action that sends an email to the inputted address

For example, press a button to trigger email validation or issue a password reset link

Step 3: Open a link using the ${MOROPO_EMAIL_URL} variable

Moropo will automatically generate and populate this variable with a valid URL pointing to a secure webpage on Moropo's server.

In script mode:

- openLink: 
    link: ${MOROPO_EMAIL_URL}

In step mode:

Step 4: Wait for the email to arrive

Moropo will check that the email has arrived every 10 seconds. If the email has not arrived then a no email yet message will be displayed. In your test, you should wait to assert that this is not visible before attempting to read the email contents using the step below. Note: Moropo will automatically refresh, there is no need to manually refresh the browser.

In script mode:

- extendedWaitUntil:
    notVisible: "no email yet.*"
    timeout: 60000

In step mode:

Step 5: Copy or assert data in the email

In the example above, we used the copyTextFrom command with regex to copy the 6-digit verification code using the following command:

- copyTextFrom:
    text: "\\d{6}"

You can paste this into an text input using:

- pasteText

Step 6: Go back to your app

If you need to back to your app, then you can use the following commands.

iOS:

- tapOn:
    id: "breadcrumb"

Android:

- back

Is this secure?

Yes. Although we do encourage you to only use test accounts and non-sensitive data when using the Moropo platform.

We render the email using a secure endpoint that is authenticated using a unique authentication token that is valid only for the duration of the test run.

Can I send multiple emails?

There is no limit on the number of emails you can send to the address during a test run. However, Moropo will only render the most recent email.

If you are sending multiple emails during a test run, you may see your previous email whilst Moropo waits for the new email to arrive. In this case, you should modify your extendedWaitUntil logic to ensure you are reading the correct email.

Does this work with SMS or text messages?

Once the email has been rendered, you can use to copy, assert or do anything else with the data in the email.

No. This functionality is email only. If you require SMS then please .

any command
raise a feature request
comment on the Canny post
Example (with sample data) showing the flow in action for email address validation