Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
src/ | H | 25-Apr-2025 | - | 6,758 | 4,737 | |
README.md | H A D | 25-Apr-2025 | 1.2 KiB | 52 | 38 | |
build.gradle | H A D | 25-Apr-2025 | 3.6 KiB | 125 | 108 | |
proguard-rules.pro | H A D | 25-Apr-2025 | 916 | 27 | 23 | |
start-emulator.sh | H A D | 25-Apr-2025 | 307 | 14 | 7 | |
wait-for-emulator.sh | H A D | 25-Apr-2025 | 361 | 17 | 12 |
README.md
1gRPC Android test App 2======================= 3 4Implements gRPC integration tests in an Android App. 5 6In order to build this app, you need a local.properties file under this directory which specifies 7the location of your android sdk: 8``` 9sdk.dir=/somepath/somepath/sdk 10``` 11 12Connect your Android device or start the emulator: 13``` 14$ ./start-emulator.sh <AVD name> & ./wait-for-emulator.sh 15``` 16 17Start test server 18----------------- 19 20Start the test server by: 21``` 22$ ../run-test-server.sh 23``` 24 25 26Manually test 27------------- 28 29Install the App by: 30``` 31$ ../gradlew installDebug 32``` 33Then manually test it with the UI. 34 35 36Instrumentation tests 37---------------- 38 39Instrumentation tests must be run on a connected device or emulator. Run with the 40following gradle command: 41 42``` 43$ ../gradlew connectedAndroidTest \ 44 -Pandroid.testInstrumentationRunnerArguments.server_host=10.0.2.2 \ 45 -Pandroid.testInstrumentationRunnerArguments.server_port=8080 \ 46 -Pandroid.testInstrumentationRunnerArguments.use_tls=true \ 47 -Pandroid.testInstrumentationRunnerArguments.server_host_override=foo.test.google.fr \ 48 -Pandroid.testInstrumentationRunnerArguments.use_test_ca=true \ 49 -Pandroid.testInstrumentationRunnerArguments.test_case=all 50``` 51 52