Error: No instrumentation runner found on device emulator-19386 for package com.package.flavour.test
See original GitHub issueDescribe the bug Followed the instructions and tried to fix this for several days. Running debug test shows Error: No instrumentation runner found on device emulator-19386 for package com.package.flavor.test I’m using flavours.
There are several issues on this that are closed with your bot, with seemingly no answer.
To Reproduce Use flavours and follow the documentation.
Use testBinaryPath because for some reason just having the binaryPath, Detox doesn’t just read it, it adds random folders in the middle of the path you defined:
binaryPath: android/app/build/outputs/apk/androidTest/flavour/debug/app-flavour-debug-androidTest.apk
Error: android/app/build/outputs/apk/androidTest/androidTest/WorkcoDebug/androidTest/app-Workco-debug-androidTest-androidTest.apk’ could not be found, did you run ‘./gradlew assembleAndroidTest’?
With testBinaryPath it uses the correct path but you have to have binaryPath set as well for some reason.
- I have tested this issue on the latest Detox release and it still reproduces
Steps to reproduce:
- Follow documentation
- Use on a flavour
- See it not work
Expected behavior
Tests run
Device and Verbose Detox Logs
detox[89859] DEBUG: [exec.js/EXEC_CMD, #11] “/Users/me/Library/Android/sdk/platform-tools/adb” -s emulator-19386 shell “pm list packages com.package.flavour.test.test”
Is this meant to have two test?
Environment (please complete the following information):
- Detox: latest
- React Native: 0.60.5
- Node: 12
- Device: emulator
- OS: MacOs
- Test-runner (select one):
jest-circus|jest-jasmine2(deprecated) |mochajest-circus
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:15
Top Related StackOverflow Question
I solved this issue by changing the android configuration as follows. It helps to solve your issue.
Please be sure that
binaryPathindicates your app APK’s path andtestBinaryPathindicates your androidTest APK’s path.Yes, that indeed confirms it:
Change it to your app APK’s path.