Android
React Native Harness allows you to run tests on both Android Emulators and physical Android devices.
Installation
First, install the Android platform package:
Configuration
Import the Android platform utilities in your rn-harness.config.mjs:
Emulators
To run on an Android Emulator, use the androidEmulator() helper. You need to provide the AVD (Android Virtual Device) name.
Finding Emulator Names
You can list all available AVDs on your system using the emulator command:
Output example:
Physical Devices
To run on a connected physical Android device, use the physicalAndroidDevice() helper.
The first argument is the manufacturer, and the second is the model name. These are used for reporting and logging purposes. Harness will automatically detect the connected device via ADB.
Requirements
- ADB: The Android Debug Bridge (
adb) must be installed and in your system PATH. - Development Build: You must have a debug build of your app installed on the device/emulator (
adb install ...). Harness does not build your app; it injects the test bundle into the existing installed app.
