For more sophisticated apps with a large number of team members and
contributors, running unit tests in an emulator may be impractical.
Emulator requires some sort of a some sort of a graphics/windowing setup.
Usually though (at least in my experience), unit tests are run on an
integrated build machines running things like Hudson or Cruise Control.
Most of the time, these machines are not or can not be set up to run a
windowing system especially when running linux.  It would be very cool if
there was a way to get around the the true emulator for unit test purposes.

On Thu, May 28, 2009 at 4:55 PM, Peter <[email protected]> wrote:

>
> Yeah, I've discovered that I need to run them on the device if they
> concern any Android objects. In any case, for what I need I can use
> standard JUnit for the non-Android specifics to get some out of
> container testing.
>
> The tests do not go in the library (jar). The test application seems
> like a possibility but I don't really like to run tests in container
> (although something like Android makes this a necessity).
>
> On May 28, 4:30 pm, Brett Chabot <[email protected]> wrote:
> > I'm not sure exactly what you mean by "using a JUnit library". If the
> JUnit
> > tests reference android.jar objects, you will need to run them on an
> Android
> > device or emulator.
> >
> > But a more basic question I have is why does your Android library need to
> > use JUnit? Will you be packaging the tests for the library inside the
> > library itself? One approach is to separate the tests for the library
> from
> > the library itself. You could define an Android test application with a
> > manifest, etc, that references the library and contains all the tests for
> > the library.
> >
> >
> >
> > On Wed, May 27, 2009 at 2:42 PM, Peter <[email protected]> wrote:
> >
> > > I am creating an Android library that does stuff like http requests,
> > > etc, that uses android.jar objects. There will be no manifest or
> > > resources, etc, however. What is the best practice regarding the JUnit
> > > library to use in this library? DO I use standard JUnit, or the one
> > > included in android.jar?
> >
>

--~--~---------~--~----~------------~-------~--~----~
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