Answering my own question and raising more, it seems any test using
android.test can't be run by JUnit on Eclipse, they are to be run on
the device or emulator according to the instructions on
http://code.google.com/android/reference/android/test/InstrumentationTestRunner.html

My cycle seems to hit the "run the application" button on Eclipse, so
the application gets compiled and installed (and as unwanted
side-effect run), go to a terminal and run
/opt/android-sdk-linux_x86-1.0_r2/tools/adb shell am instrument -w
com.blah.blah/android.test.InstrumentationTestRunner. Is there an
easier more automatic way to do it? Maybe straight from Eclipse?

To be able to do that I had to add <uses-library
android:name="android.test.runner" /> to my application in the
manifest. Does that mean that my app would be shipping with its tests
in place? Isn't that undesired?

Thanks.

On Wed, Jan 21, 2009 at 8:16 PM, J. Pablo Fernández <pup...@pupeno.com> wrote:
> Hello,
>
> According to http://code.google.com/android/kb/troubleshooting.html#addjunit
> you have to remove the Android library from your tests to run them,
> but if you remove the Android library then you can't access classes
> such as android.test.ProviderTestCase; so how do you write or run a
> ProviderTestCase?
>
> Thanks.
>



-- 
J. Pablo Fernández <pup...@pupeno.com> (http://pupeno.com)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to