Skip to content

Commit f2b2afd

Browse files
[SDK-115] Wire ci=true instrumentation arg + setAllowedProtocols(\"tester\")
Two small infra pieces that every BCIT test needs: - run-e2e.sh now passes `ci=true` as an instrumentation argument so tests can detect CI mode via InstrumentationRegistry.getArguments(). Env vars don't reach the test JVM through `am instrument`, so the arg is the only reliable channel. - BaseIntegrationTest.initializeIterableSDK now adds `tester` to IterableConfig.allowedProtocols. BCIT campaigns use `tester://` deep links; without this the SDK silently drops the URL before invoking the URL handler. Matches iOS's `config.allowedProtocols = ["tester", "https", "http"]`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 5a1db59 commit f2b2afd

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

.github/scripts/run-e2e.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ trap capture_post_test EXIT
110110
gradle_exit=0
111111
./gradlew :integration-tests:connectedDebugAndroidTest \
112112
-Pandroid.testInstrumentationRunnerArguments.package="$TEST_PACKAGE" \
113+
-Pandroid.testInstrumentationRunnerArguments.ci=true \
113114
--stacktrace --no-daemon || gradle_exit=$?
114115

115116
if [[ "$gradle_exit" -ne 0 ]]; then

integration-tests/src/androidTest/java/com/iterable/integration/tests/BaseIntegrationTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ abstract class BaseIntegrationTest {
109109
.setEnableEmbeddedMessaging(true)
110110
.setLogLevel(Log.VERBOSE)
111111
.setInAppDisplayInterval(3.0)
112+
// Match the iOS BCIT app: BCIT campaigns use `tester://` deep links.
113+
.setAllowedProtocols(arrayOf("tester", "https", "http"))
112114
.setInAppHandler { message ->
113115
// Handle in-app messages during tests
114116
Log.d("BaseIntegrationTest", "In-app message received: ${message.messageId}")

0 commit comments

Comments
 (0)