Skip to content

Android Instrumentation Tests with command line

Bart Louwers edited this page Dec 11, 2023 · 1 revision
cd platform/android
./gradlew assembleDrawableRelease assembleDrawableReleaseAndroidTest
# install app
adb install MapboxGLAndroidSDKTestApp/build/outputs/apk/drawable/release/MapboxGLAndroidSDKTestApp-drawable-release.apk
# install tests
adb install MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/drawable/release/MapboxGLAndroidSDKTestApp-drawable-release-androidTest.apk

# list packages with instrumentation
adb shell pm list instrumentation

adb shell am instrument -w org.maplibre.testapp.test/org.maplibre.android.InstrumentationRunner -e package org.maplibre.android.benchmark

# kill prematurely
adb shell am force-stop org.maplibre.testapp