Member-only story

The top E2E Maestro with React Native tips & techniques

Davyd NRB
4 min readAug 27, 2023

A collection of practical tips and techniques that simplify your developer experience with the Maestro E2E framework!

1. Installing Maestro

Let’s add a new script to the package.json file:

{
"scripts": {
"install-maestro": "MAESTRO_VERSION=1.37.0 curl -Ls 'https://get.maestro.mobile.dev' | bash"
}
}

I define the version we now support using the environment variable MAESTRO_VERSION. The use of the same version by our team and CI is guaranteed.

docs: https://maestro.mobile.dev/getting-started/installing-maestro

2. Identify the app as being run by Maestro.

When an app is run by e2e, we occasionally need to configure the behavior of the app:

  1. Disable animation / pause video;
  2. Stop sending analytics;
  3. Turn off React Native LogBox LogBox.ignoreAllLogs().

For this case, you need to add arguments to a launchApp command

- launchApp:
appId: "com.example.app"
arguments:
isE2E: "true"

And then on JS side, using react-native-launch-arguments package you can access that arguments

Davyd NRB
Davyd NRB

Written by Davyd NRB

React Native guru 🧘\ DevOps adjutant \ Linux lover ❤️

No responses yet

Write a response