Responses inline

On Sat, Jun 6, 2009 at 6:11 AM, RedMac G<[email protected]> wrote:

>
> JUnit -- android.jar has its own junit.jar and my assumption is you're
> supposed to use it, not the latest version from junit.org

There's a collection of helper test classes in android.test package as
well. For example, if your test needs access to a Context, you can use
AndroidTestCase. If you want your test to have access to
Instrumentation, which will allow it to launch activities, inject key
events, etc, then you an use one of the subclasses of
InstrumentationTestCase.

The ApiDemos/tests sample code has some test examples.

> Mockito -- read this one
> http://code.google.com/p/mockito/issues/detail?id=57

See android.test.mock for a selection of frameworks for creating
Mocks. It includes mock versions of Application, Context,
ContentResolver, PackageManager, and other commonly used Android
classes.

> EclEmma -- doesn't support Android JUnit tests
>

I'm working on supporting Emma code coverage on Android. The support
is still pretty rough, I wouldn't recommend trying it as this point
unless you are really keen. I posted info on getting Emma code
coverage data when running tests on Android on a earlier thread in
this group. It would be cool to hook into EclEmma as well but there
are no definite plans for that.

Regards,
Brett.

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

Reply via email to