Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detox build successful but detox test fails #1774

Closed
kuyazee opened this issue Nov 20, 2019 · 1 comment
Closed

Detox build successful but detox test fails #1774

kuyazee opened this issue Nov 20, 2019 · 1 comment

Comments

@kuyazee
Copy link

kuyazee commented Nov 20, 2019

Following the setup provided by Detox on adding Android, the command below that builds detox works fine with no problems

detox build -c android.emu.debug

Now for the setup on the Package.json file, I'm sure the directories are being provided correctly

"android.emu.debug": {
  "binaryPath": "../OUR-APP-NAME/app/build/outputs/apk/androidTest/dev/debug/app-dev-debug-androidTest.apk",
  "build": "cd ../OUR-APP-NAME/ && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ../OUR-APP-NAME-TESTS",
  "type": "android.emulator",
  "name": "Pixel_2_XL_API_26"
},

For some reason running detox test doesn't work

 detox test -c android.emu.debug

It throws the error message

Error: '/Users/z/Projects/company-projects/OUR-APP-NAME/app/build/outputs/apk/androidTest/androidTest/devDebug/androidTest/app-dev-debug-androidTest-androidTest.apk' could not be found, did you run './gradlew assembleAndroidTest' ?

...... 

detox[29702] ERROR: [cli.js] Error: Command failed: node_modules/.bin/mocha --opts e2e/mocha.opts --configuration android.emu.debug --loglevel verbose --grep :ios: --invert --artifacts-location "artifacts/android.emu.debug.2019-11-20 09-54-23Z" "e2e"

I've noticed that on the first error message the directory being supplied by Detox is a mistake so I tried the following

  • Created a directory containing the APK
  • Changed the directory on binaryPath of the Package.json file to a different one
  • Run the assembleAndroidTest and assembleDebug gradle step directly in Android Studio

But to no avail I haven't been able to make it work, I'm currently lost.

Notes:

  • I'm running Detox for a Native Android application
  • Our Detox setup works for our Native iOS application
  • We're using the Detox 14.4.1

I've also asked this in StackOverflow on this question

@support
Copy link

support bot commented Nov 20, 2019

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the detox tag.

Feel free to post your Stack Overflow question here for more visibility. We'll take a look at it.

For issues with Expo apps, it is most likely not an issue with Detox itself, but with the Expo runtime or with incorrect Detox setup. For support on how to use Detox with Expo, you should contact the Expo team or the Expo community.

For more information on bots in this repository, read this discussion.

@support support bot closed this as completed Nov 20, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant