forked from getsentry/sentry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-ui-critical.sh
More file actions
executable file
·35 lines (29 loc) · 1.12 KB
/
test-ui-critical.sh
File metadata and controls
executable file
·35 lines (29 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
set -e
echo "Checking if ADB is installed..."
if ! command -v adb &> /dev/null; then
echo "ADB is not installed or not in PATH. Please install Android SDK platform tools and ensure ADB is in your PATH."
exit 1
fi
echo "Checking if an Android emulator is running..."
if ! adb devices | grep -q "emulator"; then
echo "No Android emulator is currently running. Please start an emulator before running this script."
exit 1
fi
echo "Checking if Maestro is installed..."
if ! command -v maestro &> /dev/null; then
echo "Maestro is not installed. Please install Maestro before running this script."
exit 1
fi
echo "Building the UI Test Critical app..."
make assembleUiTestCriticalRelease
echo "Installing the UI Test Critical app on the emulator..."
baseDir="sentry-android-integration-tests/sentry-uitest-android-critical"
buildDir="build/outputs/apk/release"
apkName="sentry-uitest-android-critical-release.apk"
appPath="${baseDir}/${buildDir}/${apkName}"
adb install -r -d "$appPath"
echo "Running the Maestro tests..."
maestro test \
"${baseDir}/maestro" \
--debug-output "${baseDir}/maestro-logs"