Well, it doesn't look like InstrumentationTestRunner is compatible
with JUnit4TestAdapter.

Unfortunately, a JUnit 4 test runner can't run an Android test package
against an Android app.

In short, you can't figure it out because it isn't possible.

At this point, it might be more simple to convert your JUnit 4 tests
into JUnit 3 tests. As far as I can tell, all you have to do is remove
the @Test annotations and prefix all the method names with "test". You
also have to use setUp() and tearDown() instead of annotating a method
to set up or tear down a fixture.

You, of course, know best what fixtures are needed for the classes
you're trying to test with JUnit 4, but I think (naively, perhaps)
that you shouldn't have to test anything that's truly a POJO on the
device/emulator. Either the class is truly independent of Android, in
which case it shouldn't need the device, or it isn't really
independent, in which case you should run it within an Android test
case.

A.

On Aug 20, 8:33 pm, Eric <[email protected]> wrote:
> At this point I really don't understand why Android cannot run JUnit 4
> tests 'out of the box'.  There MUST be a simple way to get Eclipse/
> Android to install a JUnit 4 test runner so that when my tests run on
> the device, JUnit 4 is used.  It is discouraging that after all of the
> reading and experiments I've performed, I can't figure this out.  If
> _anyone_ out there knows how to do this, please do tell. :)

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