UstadMobile

Maestro end-to-end testing for Android

The end-to-end tests for the Android app are built using Maestro and generate reports. The scripts have been written and tested on Linux. They may work on other systems, but that has not been thoroughly tested.

Prerequisites:

Run all tests:

$ ./run-maestro-test.sh --serial1 emulator-5554

Where emulator-5554 is the serial of the emulator as per the adb devices command.

Options:

Output

Result artifacts (screenshots, screen recording, etc) will be saved as follows:

The combined report (with videos for each test) HTML will be saved to build/results/index.html

Run a single test using Maestro command line:

  1. Build and install APK on emulator or device as per app-android README

  2. Clear Data Folder in app-ktor-server:Start the server using runserver.sh or runserver.bat as per the Main README development environment setup

  3. Run Maestro command to run test

cd test-end-to-end/android-maestro
maestro test e2e-tests/<test name>.yaml -e USERNAME=admin -e PASSWORD=testpass -e TESTSERIAL=emulator-5554 -e ENDPOINT=http://<ip address>:8087/

Replace the values forPASSWORD with the server admin password, TESTSERIAL with the emulator or device serial (as per adb devices command), ENDPOINT with the server url as per the –siteUrl parameter used with runserver.