Sponsored Links
ou will never really be able to just use the default Run as JUnit test action.
This is because this setups up the tests to run using the system
library of the project which, for Android project, is android.jar.
android.jar in the SDK is only stubbed methods/classes, and contains no code.
You can run unit tests by setting up Eclipse using the follow
instructions: http://code.google.com/android/kb/troubleshooting.html#addjunit
Note that this will only work for tests not using the Android APIs.
If you wish to run true android test, please use instrumentations
running on the device.
See
http://code.google.com/android/reference/android/test/InstrumentationTestRunner.html
for more information.
The information from Diego to setup the test runners for ApiDemos is
good, except that you don't need to create a new project and copy
things over, you can simply create a project for the existing source
(you will need to link the apidemos project in your build path).
Xav
On Thu, Jan 29, 2009 at 5:44 PM, ying...@gmail.com <ying...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~