Skip to content

android-interop-testing: add AndroidX Test core and rules to androidTestImplementation#12718

Open
shivaspeaks wants to merge 3 commits intogrpc:masterfrom
shivaspeaks:fix-android-test-issue
Open

android-interop-testing: add AndroidX Test core and rules to androidTestImplementation#12718
shivaspeaks wants to merge 3 commits intogrpc:masterfrom
shivaspeaks:fix-android-test-issue

Conversation

@shivaspeaks
Copy link
Member

This change explicitly adds 'libraries.androidx.test.rules' and 'libraries.androidx.test.core' to the 'androidTestImplementation' configuration.

This alignment follows the pattern used in the 'binder' module to ensure that these testing components are correctly packaged in the Test APK. Previously, these dependencies were only declared in the 'implementation' block (Main APK), which triggered a "classpath split" issue. In that state, the test process was unable to resolve internal orchestration classes, leading to NoClassDefFoundError crashes.

Fixes #12703 (comment)

@shivaspeaks shivaspeaks added the kokoro:force-run Add this label to a PR to tell Kokoro to re-run all tests. Not generally necessary label Mar 19, 2026
@shivaspeaks shivaspeaks added kokoro:force-run Add this label to a PR to tell Kokoro to re-run all tests. Not generally necessary kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run and removed kokoro:force-run Add this label to a PR to tell Kokoro to re-run all tests. Not generally necessary labels Mar 19, 2026
@ejona86
Copy link
Member

ejona86 commented Mar 19, 2026

Please test this by running the tests using gcloud firebase. Refer to the CI:

gcloud firebase test android run \
--type instrumentation \
--app android-interop-testing/build/outputs/apk/debug/grpc-android-interop-testing-debug.apk \
--test android-interop-testing/build/outputs/apk/androidTest/debug/grpc-android-interop-testing-debug-androidTest.apk \
--environment-variables \
server_host=grpc-test.sandbox.googleapis.com,server_port=443,test_case=all \
--device model=MediumPhone.arm,version=30,locale=en,orientation=portrait \
--device model=MediumPhone.arm,version=29,locale=en,orientation=portrait \
--device model=MediumPhone.arm,version=28,locale=en,orientation=portrait \
--device model=MediumPhone.arm,version=27,locale=en,orientation=portrait \
--device model=MediumPhone.arm,version=26,locale=en,orientation=portrait \
--device model=Nexus6P,version=25,locale=en,orientation=portrait \
--device model=Nexus6P,version=24,locale=en,orientation=portrait \

@ejona86
Copy link
Member

ejona86 commented Mar 19, 2026

which triggered a "classpath split" issue.

Are you sure? You're telling me that implementation is not part of androidTestImplementation deps? That seems unlikely.

What seems more likely is there's a version skew problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants