summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/ui/fragments/SplitTunnelingFragmentTest.kt2
-rwxr-xr-xci/run-android-instrumented-tests.sh16
2 files changed, 16 insertions, 2 deletions
diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/ui/fragments/SplitTunnelingFragmentTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/ui/fragments/SplitTunnelingFragmentTest.kt
index a9ee9f8438..b7413122f2 100644
--- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/ui/fragments/SplitTunnelingFragmentTest.kt
+++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/ui/fragments/SplitTunnelingFragmentTest.kt
@@ -152,7 +152,7 @@ class SplitTunnelingFragmentTest : KoinTest {
onView(withRecyclerView(R.id.recyclerView).atPositionOnView(0, R.id.itemText))
.check(matches(withText("Test App Name")))
- onView(withRecyclerView(R.id.recyclerView).atPosition(0)).perform(click())
+ onView(withRecyclerView(R.id.recyclerView).atPositionOnView(0)).perform(click())
coVerifyAll {
mockedViewModel.listItems
diff --git a/ci/run-android-instrumented-tests.sh b/ci/run-android-instrumented-tests.sh
index a69cd29d69..cf29289c3d 100755
--- a/ci/run-android-instrumented-tests.sh
+++ b/ci/run-android-instrumented-tests.sh
@@ -5,11 +5,25 @@ LOG_FILE_NAME="mullvad.instrumentation_data_proto"
LOG_FILE_PATH="/sdcard/$LOG_FILE_NAME"
LOG_FAILURE_MESSAGE="FAILURES\!\!\!"
-adb install -r -t "$APK_BASE_DIR/debug/app-debug.apk"
+echo "Running instrumented tests..."
+echo ""
+
+echo "### Ensure uninstalled ###"
+adb uninstall net.mullvad.mullvadvpn || echo "App package not installed"
+adb uninstall net.mullvad.mullvadvpn.test || echo "Test package not installed"
+echo ""
+
+echo "### Install ###"
+adb install -t "$APK_BASE_DIR/debug/app-debug.apk"
adb install "$APK_BASE_DIR/androidTest/debug/app-debug-androidTest.apk"
+echo ""
+
+echo "### Start tests ###"
adb shell am instrument -w -f "$LOG_FILE_NAME" net.mullvad.mullvadvpn.test/androidx.test.runner.AndroidJUnitRunner
+echo ""
# Print log so that it shows as part of GitHub Actions logs etc
+echo "### Logs ###"
adb shell cat "$LOG_FILE_PATH"
if adb shell grep -q "$LOG_FAILURE_MESSAGE" "$LOG_FILE_PATH"; then