Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
fsladkey committed May 24, 2022
1 parent 998835b commit da5cb58
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions unit/BasicNativeAndroidTest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Basic sample for writing C/C++ GTest tests and running them on Android emulators / devices.

This project uses the Gradle build system. You don't need an IDE to build and execute it but Android Studio is recommended.

1. Download the project code, preferably using `git clone`.
2. In Android Studio, select *File* | *Open...* and point to the `./build.gradle` file.
3. Check out the relevant code:
* The C++ sources and tests are in `src/main/cpp`
* The device tests (which wrap the native tests) are in `src/androidTest/java`
4. Create and run the Instrumented test configuration
* Open the `AdderTest` file, and click the run icon in the gutter, or
* Manually create a configuration.
* Open *Run* menu | *Edit Configurations*
* Add a new *Android Instrumented Tests* configuration
* Choose the `app` module
* Connect a device or start an emulator
* Run the newly created configuration

If you are using Android Studio, the *Run* window will show the test results.

0 comments on commit da5cb58

Please sign in to comment.