关键命令:
直接运行所有有case adb shell am instrument -w com.myapp.test/android.test.InstrumentationTestRunner 运行一个case adb shell am instrument -w -e class com.myapp.test.TestDemo#testSearch com.myapp.test/android.test.InstrumentationTestRunner
说明:com.myapp.test是包名,com.myapp.test.TestDemo是类名 testSearch是方法名
更多信息可以参考官网:
http://developer.android.com/tools/testing/testing_otheride.html#RunTestsDevice