I followed Diego's steps to setup the test-specific eclipse project. Then I created an external tool configuration to launch the tests:
The "Functional Tests" run configuration changes the arguments to:
shell am instrument -w -e func true com.wilson.android.libary.test/android.test.InstrumentationTestRunnerNow each time I'm ready to run the tests I need to deploy the main project, the test project -- if they both changed. Now I can use one of the run configurations above to use "adb" to launch the tests.
Be sure to read the official documentation on running instrumentation tests, starting here.
2 comments:
please note: I updated to the 0.9.1 release of the Android Dev kit Eclipse plugin and non of this nonsense is necessary. Just run Run As -> Android JUnit Test.
Hi James,
I still find your post useful.
If for instance you want to exclude the those tests which have @LargeTest annotation the way you described in the post is the only way to do it:
shell am instrument -w -e notAnnotation android.test.suitebuilder.annotation.LargeTest com.mycompany.myproject.test/android.test.InstrumentationTestRunner
There is no such option in Android Junit Test configuration.
Thanks a lot.
Post a Comment