1 gRPC Android test App 2 ======================= 3 4 Implements gRPC integration tests in an Android App. 5 6 TODO(madongfly) integrate this App into the gRPC-Java build system. 7 8 In order to build this app, you need a local.properties file under this directory which specifies 9 the location of your android sdk: 10 ``` 11 sdk.dir=/somepath/somepath/sdk 12 ``` 13 14 Connect your Android device or start the emulator: 15 ``` 16 $ ./start-emulator.sh <AVD name> & ./wait-for-emulator.sh 17 ``` 18 19 Start test server 20 ----------------- 21 22 Start the test server by: 23 ``` 24 $ ../run-test-server.sh 25 ``` 26 27 28 Manually test 29 ------------- 30 31 Install the App by: 32 ``` 33 $ ../gradlew installDebug 34 ``` 35 Then manually test it with the UI. 36 37 38 Instrumentation tests 39 ---------------- 40 41 Instrumentation tests must be run on a connected device or emulator. Run with the 42 following gradle command: 43 44 ``` 45 $ ../gradlew connectedAndroidTest \ 46 -Pandroid.testInstrumentationRunnerArguments.server_host=10.0.2.2 \ 47 -Pandroid.testInstrumentationRunnerArguments.server_port=8080 \ 48 -Pandroid.testInstrumentationRunnerArguments.use_tls=true \ 49 -Pandroid.testInstrumentationRunnerArguments.server_host_override=foo.test.google.fr \ 50 -Pandroid.testInstrumentationRunnerArguments.use_test_ca=true \ 51 -Pandroid.testInstrumentationRunnerArguments.test_case=all 52 ``` 53 54