0

Getting the error every time I run the detox/wix test case on android emulator.

> android.util.AndroidException: INSTRUMENTATION_FAILED: com.mobile.sampleApp.debug.test/android.support.test.runner.AndroidJUnitRunner
nstrumentation stdout: 
 nstrumentation stdout: 
 android.util.AndroidException: INSTRUMENTATION_FAILED: com.mobile.sampleApp.debug.test/android.support.test.runner.AndroidJUnitRunner
 nstrumeat com.android.commands.am.Instrument.run(Instrument.java:421)
 nstrumeat com.android.commands.am.Am.runInstrument(Am.java:187)
 nstrumeat com.android.commands.am.Am.onRun(Am.java:80)
 nstrumeat com.android.internal.os.BaseCommand.run(BaseCommand.java:54)
 nstrumeat com.android.commands.am.Am.main(Am.java:50)
 nstrumeat com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
 nstrumeat com.android.internal.os.RuntimeInit.main(RuntimeInit.java:285)

Package.json

"scripts": {
    "js-app": "RN_E2E_TESTS=E2E react-native start",
    "postinstall": "node ./scripts/postinstall.js && repackager setup",
    "start": "watchman watch-del-all && (adb reverse tcp:8081 tcp:8081 || true) && node node_modules/react-native/local-cli/cli.js start
--reset-cache",
    "xcode": "open ios/example.xcodeproj",
    "android": "cd android && ./gradlew installDebug",
    "e2e:build": "detox build --configuration android.emu.debug",
    "e2e:test":  "detox test --configuration android.emu.debug --reuse -l verbose",
    "e2e:ios": "detox test --configuration ios.sim.debug",
    "e2e-release": "detox test --configuration ios.sim.release"   },
abdul
  • 340
  • 6
  • 18

1 Answers1

0

removing the '--reuse' option in package.json script configuration and rebuilding and running the test solved the issue.

"e2e:test":  "detox test --configuration android.emu.debug --reuse -l verbose"

changed to --->

"e2e:test":  "detox test --configuration android.emu.debug -l verbose"
abdul
  • 340
  • 6
  • 18