grpc-java/android-interop-testing
Xudong Ma d238d86a3c Some changes to Android interop test App:
1. Call runTest() for test "all", this is required by some internal code.
2. Turn off proguard for debug App.
3. Catch Throwable when we run the test, so that some errors like OutOfMemoryError would fail the test.
4. Compare message size for veryLargeResponse test, otherwise comparing two message would create two more large byte arrarys.
2015-12-14 13:11:59 -08:00
..
app Some changes to Android interop test App: 2015-12-14 13:11:59 -08:00
README.md Add the Android interop test App. 2015-06-26 15:31:14 -07:00
build.gradle Revert "Draft of Android specific Channe builder" 2015-09-09 10:18:45 -07:00
settings.gradle Add the Android interop test App. 2015-06-26 15:31:14 -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.

TODO(madongfly) integrate this App into the gRPC-Java build system.

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

Manually test

Install the App by:

$ ../gradlew installDebug

Then manually test it with the UI.

Commandline test

Run the test with arguments:

$ adb shell am instrument -w -e server_host <hostname or ip address> -e server_port 8030 -e server_host_override foo.test.google.fr -e use_tls true -e use_test_ca true -e test_case all io.grpc.android.integrationtest/.TesterInstrumentation

If the test passed successfully, it will output:

INSTRUMENTATION_RESULT: grpc test result=Succeed!!!
INSTRUMENTATION_CODE: 0

otherwise, output something like:

INSTRUMENTATION_RESULT: grpc test result=Failed... : <exception stacktrace if applicable>
INSTRUMENTATION_CODE: 1