It is a fork of the Detox Demo Project
- Windows 8 or 10.
- Have Node installed.
- Make sure you have react-native dependencies installed:
- react-native-cli is installed (
npm install -g react-native-cli
)
- react-native-cli is installed (
- replace the name of the emulator where it says the
"name":
insidepackage.json
.
"android.emu.debug": {
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
"build": "cd android && gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
"type": "android.emulator",
"name": "Nexus_9_API_28"
},
"android.emu.release": {
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
"build": "cd android && gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..",
"type": "android.emulator",
"name": "Nexus_9_API_28"
}
- Make sure you're in folder
/react-native-detox
. - Run
npm install
.
- Build the demo project for ios
detox build --configuration ios.sim.release
- Build the demo project for android
detox build --configuration android.emu.release
- Run tests on the demo project for ios
detox test --configuration ios.sim.release
- Run tests on the demo project for android
detox test --configuration android.emu.release
This action will open a new simulator and run the tests on it.
- Build the demo project for ios
detox build --configuration ios.sim.debug
- Build the demo project for android
detox build --configuration android.emu.debug
- start react-native packager
npm run start
- Run tests on the demo project
detox test --configuration ios.sim.debug
detox test --configuration android.emu.debug
- Build and Test the demo project for ios
detox build --configuration ios.sim.release && detox test --configuration ios.sim.release
- Build and Test the demo project for android
detox build --configuration android.emu.release && detox test --configuration android.emu.release
This action will open a new simulator or emulator and run the tests on it.