Derek Ekins
Derek Ekins

Reputation: 11391

Run android application with instrumentation turned on

I have created a customised version of android.app.Instrumentation and have modified my AndroidManifest.xml to use it.

However when I run the application from eclipse it does not seem to load my instrumentation object (am logging and settings global (I know horrible, just for now I swear!) variables that I later check)

I think I need to run it using adb and telling it to use instrumentation but I can't find the correct instructions for doing this (and I have read so much about instrumentation the last few days I am start to go nuts!)

Upvotes: 4

Views: 3714

Answers (1)

Diego Torres Milano
Diego Torres Milano

Reputation: 69208

Run

   $ adb shell pm list instrumentation

to verify that your instrumentation is there. You will receive something like

   instrumentation:my.pkg.text/my.instr (target=my.pkg)

then run

 $ adb shell am instrument -w my.pkg.test/my.instr

Upvotes: 8

Related Questions