2

I'm trying to integrate fastlane screengrab into the android application and i'm running into the following issue when i execute the command. screengrab.

[16:30:42]: ▸ INSTRUMENTATION_STATUS: id=ActivityManagerService
[16:30:42]: ▸ INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.example.android.test/android.support.test.runner.AndroidJUnitRunner}
[16:30:42]: ▸ INSTRUMENTATION_STATUS_CODE: -1
[16:30:42]: ▸ android.util.AndroidException: INSTRUMENTATION_FAILED: com.example.android.test/android.support.test.runner.AndroidJUnitRunner
  • i have no idea why it's picking ...test/android.support.test.runner.AndroidJUnit path when i specify only {com.example.android/android.support.test.runner.AndroidJUnitRunner – Andrei Chernyshev Jun 14 '16 at 20:42
  • Hi Andrei, I'd need more information to help you get something working. Can you provide more information about how you are invoking screengrab? I would need to know about the command line call or action invocation from your Fastfile. Also, any relevant configuration from your project: show your Screengrabfile, if you use it, and build.gradle definitions of your applicationId and testInstrumentationRunner. Thanks! – Mike Furtak Mar 24 '17 at 17:05

1 Answers1

1

Just add testInstrumentationRunner into the build.gradle file

android {
        ...
        defaultConfig {
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
    }

And run the command:

fastlane screengrab

anha1979
  • 199
  • 1
  • 3
  • 15
Pavel
  • 642
  • 7
  • 13