Android 单元测试cmd 命令集
对app进行单元测试时,或使用robotium进行黑盒测试时,需要把测试apk安装到模拟器或者android真机上,然后用命令去驱动测试1.运行测试程序命令-运行测试工程中所有test方法:>adb shell am instrument -w 测试程序packageName/android.test.InstrumentationTestRunner例如:>adb shell am instrument -w com.example.action02.test/android.test.InstrumentationTestRunner2.运行测试程序命令-运行测试工程中指定测试类方法:>abd shell am instrument -e class package.testClass(测试类) -w packageName/android.test.InstrumentationTestRunner例如:adb shell am instrument -e class com.example.action02.test.testlogin -w com.exam...