File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
unit/BasicNativeAndroidTest Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ # Basic sample for writing C/C++ GTest tests and running them on Android emulators / devices.
2+
3+ This project uses the Gradle build system. You don't need an IDE to build and execute it but Android Studio is recommended.
4+
5+ 1 . Download the project code, preferably using ` git clone ` .
6+ 2 . In Android Studio, select * File* | * Open...* and point to the ` ./build.gradle ` file.
7+ 3 . Check out the relevant code:
8+ * The C++ sources and tests are in ` src/main/cpp `
9+ * The device tests (which wrap the native tests) are in ` src/androidTest/java `
10+ 4 . Create and run the Instrumented test configuration
11+ * Open the ` AdderTest ` file, and click the run icon in the gutter, or
12+ * Manually create a configuration.
13+ * Open * Run* menu | * Edit Configurations*
14+ * Add a new * Android Instrumented Tests* configuration
15+ * Choose the ` app ` module
16+ * Connect a device or start an emulator
17+ * Run the newly created configuration
18+
19+ If you are using Android Studio, the * Run* window will show the test results.
You can’t perform that action at this time.
0 commit comments