I'm using detox
for end-to-end testing my react-native app. When I try to run yarn detox build -c android.emu.release
it does not run the script well cd android ; ./gradlew assembleRelease app:assembleAndroidTest -DtestBuildType=release ; cd -
. This script was generated automatically by detox init
.
Here is my package.json
file:
{
"detox": {
/*...*/
"android.emu.release": {
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
"build": "cd android ./gradlew assembleRelease app:assembleAndroidTest -DtestBuildType=release ; cd -", //<<<<<<<<<<<
"type": "android.emulator",
"device": {
"avdName": "NexusOneAPI29"
}
}
/*...*/
},
/*...*/
}
I am struggling to run yarn detox build -c android.emu.release
for instance. If
Which symbol/char do I need to use to concat commands instead of ;
on detox?
The main error I believe is: The system cannot find the path specified.
extracted from below.
$ yarn detox-build
yarn run v1.21.1
detox[7600] INFO: [build.js] cd android ; gradlew assembleRelease app:assembleAndroidTest -DtestBuildType=release ; cd -
The system cannot find the path specified.
detox[7600] ERROR: [cli.js] Error: Command failed: cd android ; gradlew assembleRelease app:assembleAndroidTest -DtestBuildType=releas
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.