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

Testing WEB Sevices and Automating SOAP Services

Performance Testing on CI: Locust is running on Jenkins

Change Default Timeout and Wait Time of Capybara

Performance Testing on CI: Integration of Locust and Jenkins

Create an Alias for Interactive Console Work: Selenium and Capybara