grpc-java/android-interop-testing
Eric Anderson 87c7b7a375 interop-testing: Move soak out of AbstractInteropTest
The soak code grew considerably in 6a92a2a22e. Since it isn't a JUnit
test and doesn't resemble the other tests, it doesn't belong in
AbstractInteropTest. AbstractInteropTest has lots of users, including it
being re-compiled for use on Android, so moving it out makes the
remaining code more clear for the more common cases.
2025-01-14 13:28:10 -08:00
..
src Fix typo in deprecated blocking stub javadoc. (#11772) 2024-12-26 13:31:34 -08:00
README.md android-interop-testing: include android interop testing in main build (#6829) 2020-03-19 12:37:48 -07:00
build.gradle interop-testing: Move soak out of AbstractInteropTest 2025-01-14 13:28:10 -08:00
proguard-rules.pro Upgrade Android Gradle plugin to 7.4.0 (#9933) 2023-03-08 11:18:27 -08:00
start-emulator.sh Add the Android interop test App. 2015-06-26 15:31:14 -07:00
wait-for-emulator.sh Add the Android interop test App. 2015-06-26 15:31:14 -07:00

README.md

gRPC Android test App

Implements gRPC integration tests in an Android App.

In order to build this app, you need a local.properties file under this directory which specifies the location of your android sdk:

sdk.dir=/somepath/somepath/sdk

Connect your Android device or start the emulator:

$ ./start-emulator.sh <AVD name> & ./wait-for-emulator.sh

Start test server

Start the test server by:

$ ../run-test-server.sh

Manually test

Install the App by:

$ ../gradlew installDebug

Then manually test it with the UI.

Instrumentation tests

Instrumentation tests must be run on a connected device or emulator. Run with the following gradle command:

$ ../gradlew connectedAndroidTest \
    -Pandroid.testInstrumentationRunnerArguments.server_host=10.0.2.2 \
    -Pandroid.testInstrumentationRunnerArguments.server_port=8080 \
    -Pandroid.testInstrumentationRunnerArguments.use_tls=true \
    -Pandroid.testInstrumentationRunnerArguments.server_host_override=foo.test.google.fr \
    -Pandroid.testInstrumentationRunnerArguments.use_test_ca=true \
    -Pandroid.testInstrumentationRunnerArguments.test_case=all