Skip to content

Commit 8e473d4

Browse files
author
Antonis
committed
Working on #586: Check/implement what other CI/CD automation might be needed, removed TF from UI test builds
1 parent 641dc60 commit 8e473d4

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

Examples/restcomm-olympus/app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ android {
4949
buildConfigField "String", "TEST_RESTCOMM_PASSWORD", TEST_RESTCOMM_PASSWORD
5050
buildConfigField "String", "TEST_RESTCOMM_ACCOUNT_SID", TEST_RESTCOMM_ACCOUNT_SID
5151
buildConfigField "String", "TEST_RESTCOMM_AUTH_TOKEN", TEST_RESTCOMM_AUTH_TOKEN
52-
//buildConfigField "String", "TEST_MESSAGE_VERIFICATION", TEST_MESSAGE_VERIFICATION
52+
buildConfigField "boolean", "ENABLE_TEST_FAIRY_RUNTIME", ENABLE_TEST_FAIRY_RUNTIME
53+
5354

5455

5556
// ICE_USERNAME & ICE_PASSWORD are defined in project gradle.properties, but also overriden in global gradle.properties

Examples/restcomm-olympus/app/src/main/java/org/restcomm/android/olympus/MainActivity.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ protected void onCreate(Bundle savedInstanceState)
9696

9797
// For TestFairy troubleshooting. IMPORTANT: remove for production apps, as TestFairy sends logs, screenshots, etc to their servers
9898
//TestFairy.begin(this, "#TESTFAIRY_APP_TOKEN");
99-
TestFairy.begin(this, "52d3ee1de1b7681d1fcbbc3295b2b86a0aa43fcc");
99+
if (BuildConfig.ENABLE_TEST_FAIRY_RUNTIME) {
100+
TestFairy.begin(this, "52d3ee1de1b7681d1fcbbc3295b2b86a0aa43fcc");
101+
}
100102

101103
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
102104
setSupportActionBar(toolbar);

Examples/restcomm-olympus/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ TEST_RESTCOMM_PASSWORD = "1234"
3636
TEST_RESTCOMM_ACCOUNT_SID = ""
3737
TEST_RESTCOMM_AUTH_TOKEN = ""
3838

39+
# When this is true, then when Olympus App starts it will bootstrap TestFairy facilities
40+
ENABLE_TEST_FAIRY_RUNTIME = true
3941

4042
# Android version name & code: For official builds, this gets overwritten by global settings and/or environment variables
4143
# When using double quotes in this one the generated BuildConfig.java get's messed up (has 2 double quotes and breaks the build)

scripts/handle-ui-tests.bash

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ fi
2424
cd Examples/restcomm-olympus || exit 1 # && wait_with_output ./gradlew app:connectedAndroidTest
2525

2626
# Build App and Test .apk files (remember that for instrumented tests we need 2 apks one of the actual App under test and another for the testing logic)
27+
# Important: we don't want TestFairy to be enabled in runtime for Olympus UI tests: a. Because we don't care since we can get logs from Firebase, b. TF messes up our tests because it presents some UI elements (like auto update dialog)
2728
echo "-- Build App and Test .apk files"
28-
./gradlew --quiet -x androidJavadocs -x signArchives -x uploadArchives assembleDebug assembleDebugAndroidTest
29+
./gradlew --quiet -x androidJavadocs -x signArchives -x uploadArchives assembleDebug assembleDebugAndroidTest -PENABLE_TEST_FAIRY_RUNTIME=false
2930
if [ $? -ne 0 ]
3031
then
3132
echo "-- Failed to build Olympus for UI tests."

0 commit comments

Comments
 (0)