android unit tests via command line
I have an Android Project and a TestProject, and I've written some unit tests. I can run all Tests in eclipse.
No I try to run the tests via command-line, because I want to parse the output: adb shell am instrument -w -r com.allg.test/android.test.InstrumentationTestRunner
Everything seems fine. But when I am editing a TestCase, and run the command again, the output will not change (although I changed a test). I have to run the tests in eclipse first, to refresh the command line test result.
How is this possi开发者_运维技巧ble?
That command line only runs the tests that are on the device. If you've edited a TestCase, you'll need to recompile it, and reinstall it on to the device.
精彩评论