Fix for Calabash-android Run INSTRUMENTATION_FAILED exception


When you set-up a new android devices or update your .apk file, you may possible get INSTRUMENTATION_FAILED exception:


android.util.AndroidException: INSTRUMENTATION_FAILED: com.package.name/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner
 at com.android.commands.am.Am.runInstrument(Am.java:1093)
 at com.android.commands.am.Am.onRun(Am.java:371)
 at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
 at com.android.commands.am.Am.main(Am.java:100)
 at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
 at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:251)

To fix this issue you can follow the instruction below:

  1. Create new folder
  2. Copy your .apk file into the newly created folder
  3. go to your newly created folder and run this command to create calabash-android project
    calabash-android gen
  4. run calabash-android via your new devices
    calabash-android run latest.apk features ADB_DEVICE_ARG=192.168.56.101:5555
  5. resign .apk if you need
    calabash-android resign latest.apk
  6. return to your main project folder and run your test cases as usual:
    calabash-android run latest.apk features ADB_DEVICE_ARG=192.168.56.101:5555
  7. You can delete your newly your created folder

Comments

Popular posts from this blog

Selenium Error "Element is not currently interactable and may not be manipulated"

Change Default Timeout and Wait Time of Capybara

Page-Object Pattern for Selenium Test Automation with Python

Performance Testing on CI: Locust is running on Jenkins

How to Set Shared Preferences in Espresso Test for Kotlin and Java