SDKS-4641#28
Conversation
|
…on for BrowserStack e2e builds
…configuration entry
…r BrowserStack e2e Detox requires a network_security_config.xml to allow cleartext WebSocket traffic to localhost/10.0.2.2 for its instrumentation layer. Without it, the Detox server connection is unreliable on Android 9+, causing the React context to not be ready when idling resources are initialized. Also adds testBuildType dynamic property and the Detox-supplied proguard rules for release builds.
…make android flow on call
There was a problem hiding this comment.
This looks like a metro build artifact
There was a problem hiding this comment.
Good catch. This was a remaining when testing the Detox/BrowserStack Android setup. I'll remove it.
| // The :detox source module uses @ExperimentalStdlibApi APIs without opt-in | ||
| // annotations. Kotlin 2.1 treats missing opt-in as a compile error, so we | ||
| // inject the flag globally for all subprojects. | ||
| tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { |
There was a problem hiding this comment.
Looks pretty broad. Could we scope the flag for :detox source module instead? Something like this maybe:
project(':detox') {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions { freeCompilerArgs += ['-opt-in=kotlin.ExperimentalStdlibApi'] }
}
}
| "build:e2e:ios": "detox build --configuration ios.sim", | ||
| "build:bs:ios:archive": "sh -c 'set -eu; ARCHIVE_PATH=${BS_IOS_ARCHIVE_PATH:-ios/build/browserstack/PingTestRunner.xcarchive}; EXTRA_XCODEBUILD_ARGS=${BS_IOS_ARCHIVE_XCODEBUILD_ARGS:-}; xcodebuild -workspace ios/PingTestRunner.xcworkspace -scheme PingTestRunner -configuration Release -destination generic/platform=iOS -archivePath \"$ARCHIVE_PATH\" $EXTRA_XCODEBUILD_ARGS archive'", | ||
| "build:bs:ios:ipa": "sh -c 'set -eu; ARCHIVE_PATH=${BS_IOS_ARCHIVE_PATH:-ios/build/browserstack/PingTestRunner.xcarchive}; EXPORT_PATH=${BS_IOS_EXPORT_PATH:-ios/build/browserstack/export}; EXPORT_OPTIONS_PLIST=${BS_IOS_EXPORT_OPTIONS_PLIST:?Set BS_IOS_EXPORT_OPTIONS_PLIST to an exportOptions.plist path}; xcodebuild -exportArchive -archivePath \"$ARCHIVE_PATH\" -exportPath \"$EXPORT_PATH\" -exportOptionsPlist \"$EXPORT_OPTIONS_PLIST\"'", | ||
| "build:bs:ios:test-suite": "sh -c 'set -eu; DERIVED_DATA_PATH=${BS_IOS_DERIVED_DATA_PATH:-ios/build/browserstack-derived-data}; EXTRA_XCODEBUILD_ARGS=${BS_IOS_TEST_SUITE_XCODEBUILD_ARGS:-}; SIGNING_ARGS=\"\"; if [ -n \"${BS_IOS_TEAM_ID:-}\" ]; then SIGNING_ARGS=\"$SIGNING_ARGS DEVELOPMENT_TEAM=${BS_IOS_TEAM_ID}\"; fi; if [ -n \"${BS_IOS_APP_PROFILE_UUID:-}\" ] || [ -n \"${BS_IOS_UI_TEST_PROFILE_UUID:-}\" ]; then SIGNING_ARGS=\"$SIGNING_ARGS CODE_SIGN_STYLE=Manual\"; fi; if [ -n \"${BS_IOS_APP_PROFILE_UUID:-}\" ]; then SIGNING_ARGS=\"$SIGNING_ARGS APP_PROVISIONING_PROFILE_UUID=${BS_IOS_APP_PROFILE_UUID}\"; fi; if [ -n \"${BS_IOS_UI_TEST_PROFILE_UUID:-}\" ]; then SIGNING_ARGS=\"$SIGNING_ARGS UI_TEST_PROVISIONING_PROFILE_UUID=${BS_IOS_UI_TEST_PROFILE_UUID}\"; fi; xcodebuild -workspace ios/PingTestRunner.xcworkspace -scheme PingTestRunner -configuration Debug -sdk iphoneos -destination generic/platform=iOS -derivedDataPath \"$DERIVED_DATA_PATH\" $SIGNING_ARGS $EXTRA_XCODEBUILD_ARGS build-for-testing; cd \"$DERIVED_DATA_PATH/Build/Products/Debug-iphoneos\"; rm -f PingTestRunnerUITests-Runner.zip; zip --symlinks -r PingTestRunnerUITests-Runner.zip PingTestRunnerUITests-Runner.app'", |
There was a problem hiding this comment.
We probably can extract this to a separate file in scripts/
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
- add browser and device-profile iOS test specs and include them in the PingTestRunner test scheme - add Swift unit tests for browser and device-profile shared iOS bridge logic - wire lefthook on postinstall with pre-commit formatting, lint, and copyright checks - add the copyright validation script and update cleanup-docs-preview permissions
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds BrowserStack E2E pipelines for Android and iOS, broad CI workflow updates, expanded coverage reporting, Detox cloud configuration, numerous iOS UI tests and helpers, Android/Gradle Detox integration, test build scripts, and standardizes Jest/Android coverage across packages. Changes
sequenceDiagram
participant GH as GitHub Actions
participant Local as Build Runner (macOS/Ubuntu)
participant Repo as Repository (code/scripts)
participant BrowserStack as BrowserStack API
participant Detox as Detox Cloud Runner
participant Results as Results Parser
GH->>Local: checkout + setup toolchain (node/java/xcode)
Local->>Repo: run build scripts (assemble APK/IPA, build-tests)
Local->>BrowserStack: upload app + test artifacts (REST)
BrowserStack-->>Local: app_url / test_url (or error)
GH->>BrowserStack: start test build (POST payload with app/test urls & env)
BrowserStack->>Detox: execute tests on device farm
Detox->>BrowserStack: stream/capture logs & status
GH->>BrowserStack: poll build status
BrowserStack-->>GH: final status + device sessions
GH->>Results: parse logs, write $GITHUB_STEP_SUMMARY
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
I'd suggest using macos-26-xlarge wherever possible...
…erministic unit tests
PR Summary
This PR adds BrowserStack-backed end-to-end coverage for
PingTestRunneracross both Android and iOS. It introduces reusable GitHub Actions workflows for BrowserStack execution, updates the runner build/signing setup to support cloud execution, and adds a broad iOS XCUITest suite that mirrors the existing sample-app scenarios.Reviewer Notes
.github/workflowsfirst. The main behavior change is the new reusable BrowserStack automation, including a dedicated macOS artifact-prep flow for signed iOS app and XCUITest bundles.PingTestRunner, the highest-risk changes are the BrowserStack-specific build/test plumbing:useJourney, anduseOidc.Key Changes by workspace
.githube2e-tests.ymlinto a reusable workflow entrypoint.Workspace root
PingTestRunnerandroidTestbuild wiring:detoxsource module integrationPingTestRunnerUITests.Summary by CodeRabbit
New Features
Testing
CI/CD