Skip to content

Instantly share code, notes, and snippets.

@prolificcoder
Last active November 10, 2024 20:02
Show Gist options
  • Select an option

  • Save prolificcoder/b2f70c30ce8f59dc095237e7d658057e to your computer and use it in GitHub Desktop.

Select an option

Save prolificcoder/b2f70c30ce8f59dc095237e7d658057e to your computer and use it in GitHub Desktop.
Running maestro (mobile UI automation tool) locally and executing all tests

Get code down git clone git@github.com:mobile-dev-inc/maestro.git cd maestro

Maestro is a Kotlin/java/gradle project and you might need to install some of these if you don't have them already

Make sure Java 11 is installed

if java -version doesn't say 11

brew install jenv
brew install adoptopenjdk11
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
jenv add <other versions as needed>

Make sure ANDROID_HOME variable is setup

If AS is not installed, installed it

export ANDROID_HOME=~/Library/Android/sdk

adb is on path

export $PATH="$PATH:$ANDROID_HOME/platform-tools

Run build

./gradlew build

This will run basic build commands and unit tests

Create maestro binary

./gradlew :maestro-cli:installDist

Put local maestro on path

Assuming $HOME/Code/maestro is where you downloaed code in your profile

#For local maestro
export PATH="$PATH:$HOME/Code/maestro/maestro-cli/build/install/maestro/bin"

Run e2e tests

cd e2e
./download_apps
./install_apps android
./run_tests android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment