Currently I'm running instrumentations tests from the command line this way:
adb shell am instrument -w com.blah.blah/android.test.InstrumentationTestRunner
Is there a way to run them from Eclipse (with automatic installation of the application)?
I was not able to determine automatic deployment to the emulator. However, you can take that same "adb shell" command and create an external launch configuration. I blogged on this same topic here. Launching this way is a bit more intuitive when you're also using the "-e debug true" argument.
However, I think I've gotten more mileage out of the bash shell script (if you're using a good development platform) :
function adbtest() {
adb shell am instrument -w -e class blah.package.$1 blah.package.test/android.test.InstrumentationTestRunner;
}
That way when I want to test blah.package.FooTest I only need to remember to type:
james@trex:~$ adbtest FooTest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With