Run via CLI
flashlight.dev is now in open beta! 🥳
Installation
Install the CLI with:
- macOS/Linux
- Windows
curl https://get.flashlight.dev | bash
On a macOS with arm64 architecture (Silicon), you'll need to install Rosetta if you don't have it:
softwareupdate --install-rosetta --agree-to-license
More details here
iwr https://get.flashlight.dev/windows -useb | iex
Usage
Create your API key here and set it as an environment variable:
export FLASHLIGHT_API_KEY="fl_xxxxx"
Create your Maestro test file, for instance start.yml
:
appId: com.example
---
- launchApp
- assertVisible: A text on your app
Flashlight Cloud supports only Maestro for now, if you wish to have support for more testing frameworks, feel free to reach out!
Then run:
flashlight cloud --app example.apk --test start.yml --duration 10000
Both .apk
and .aab
are supported.
Run before measuring (log in/accept cookies...)
You might need to run some custom things before measuring performance, for instance accepting cookies or logging in.
Create a new Maestro test file, for instance beforeAll.yml
:
appId: com.example
---
- launchApp
- tapOn: "Accept cookies"
# Login
- tapOn: "Username"
- inputText: "myappisawesome@flashlight.dev"
- tapOn: "Password"
- inputText: "Very Secure Password"
- tapOn: "Log in"
# Ensure login has happened before closing app
- assertVisible: "Welcome back"
Now run:
flashlight cloud --app example.apk \
--test start.yml \
--duration 10000 \
--beforeAll beforeAll.yml
The beforeAll
test will only be run once and won't be included in performance measures.