Armando Rodriguez
Armando Rodriguez

Reputation: 29

android.util.AndroidException: INSTRUMENTATION_FAILED

Armandos-MacBook-Air:cucumber armando.rodriguez$ calabash-android run m......apk No test server found for this combination of app and calabash version. Recreating test server. Done signing the test server. Moved it to test_servers/430f6c154d763823fecdda70ac84695a_0.4.18.apk Feature: Login to the app

  Scenario: Successful login                             # features/login.feature:3
        as first time after 
        restart the simulator
4629 KB/s (555713 bytes in 0.117s)
4840 KB/s (665402 bytes in 0.134s)
android.util.AndroidException: INSTRUMENTATION_FAILED: com......test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner
    at com.android.commands.am.Am.runInstrument(Am.java:586)
    at com.android.commands.am.Am.run(Am.java:117)
    at com.android.commands.am.Am.main(Am.java:80)
    at com.android.internal.os.RuntimeInit.finishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:238)
    at dalvik.system.NativeStart.main(Native Method)
  App did not start (RuntimeError)

Any idea?

Upvotes: 2

Views: 3780

Answers (1)

Dallas
Dallas

Reputation: 1055

This was rather confusing for me, but ended up being simply that I didn't have enough information to know why the instrumentation was failing.

Through some testing, I figured out that the problem was the instrumentation APK was installed , verified via

adb shell pm list instrumentation | grep <my.package.name>

but that the package for which the instrumentation was supposed to test was not installed, verified via

adb shell pm list packages | grep <my.package.name>

The problem being that I was trying to install a debug build while the production build already existed (in my case, with a different package name) on the device for which I had a conflicting ContentProvider. This is probably more of an edge case, but I imagine there are other cases where calabash is attempting to install a differently signed APK on a device that already has an APK with the same package name.

Upvotes: 2

Related Questions