grpc-java/android-interop-testing
ZHANG Dapeng 2e84b0f20a
android: bump min Android SDK version to 19 (#8583)
As Google Play Service [discontinued updates for Jelly Bean (API levels 16, 17 & 18)](https://android-developers.googleblog.com/2021/07/google-play-services-discontinuing-jelly-bean.html).
2021-10-06 10:02:32 -07:00
..
src Make binder instrumentation tests run on kokoro. (#8563) 2021-09-29 11:28:14 +02:00
README.md android-interop-testing: include android interop testing in main build (#6829) 2020-03-19 12:37:48 -07:00
build.gradle android: bump min Android SDK version to 19 (#8583) 2021-10-06 10:02:32 -07:00
proguard-rules.pro android-interop-testing: include android interop testing in main build (#6829) 2020-03-19 12:37:48 -07: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