[android-developers] Re: JUnit on the emulator without instrumentation

2009-05-28 Thread Brett Chabot

Sorry for responding to this thread so late. Have you looked at the
test running support that is in the latest 0.9.X ADT Plugin For
Eclipse? You should be able to invoke a "Debug As > Android JUnit
Test" which will run instrumentation tests and automatically connect
the Eclipse debugger.


On Apr 6, 12:20 pm, gudujarlson  wrote:
> Thanks for the response. I am aware of the instrumentation mechanism
> to run tests, however I have been unable to determine how to use it in
> conjunction with the debugger in eclipse, thus it is essentially
> useless to me.
>
> On Apr 5, 11:10 pm, Andrew Stadler  wrote:
>
> > It's actually quite useful and doable to write "pure" unit tests
> > within the InstrumentationTestRunner framework.
>
> > For a working example, please take a look at ApiDemos, in the tests/
> > directory, and look for classes that extend the "TestCase" class.
>
> > Benefits of doing it this way:
>
> > 1.  Although you can restrict yourself to pureJUnitstyle tests if
> > you want, you can also write a mix of tests, ranging from purely unit
> > (extending TestCase and AndroidTestCase) to almost totally functional
> > (e.g. extending ActivityInstrumentationTestCase) and group them
> > together as a test suite.
>
> > 2.  Although it doesn't work in the published SDK, quite soon you will
> > in fact be able to run these tests directly from Eclipse.  In other
> > words, because this is the supported mechanism, you'll benefit from
> > upcoming improvements & tools.
>
> > Hope this helps.
>
> > --Andy
>
> > On Fri, Mar 27, 2009 at 10:15 PM, gudujarlson  wrote:
>
> > > I discovered that at least some ofJUnitexists on the emulator. In
> > > particular TestCase and Assert exist. However, TestRunner does not
> > > appear to exist. I find it odd that only parts ofJUnitare present.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: JUnit on the emulator without instrumentation

2009-04-06 Thread gudujarlson

Thanks for the response. I am aware of the instrumentation mechanism
to run tests, however I have been unable to determine how to use it in
conjunction with the debugger in eclipse, thus it is essentially
useless to me.

On Apr 5, 11:10 pm, Andrew Stadler  wrote:
> It's actually quite useful and doable to write "pure" unit tests
> within the InstrumentationTestRunner framework.
>
> For a working example, please take a look at ApiDemos, in the tests/
> directory, and look for classes that extend the "TestCase" class.
>
> Benefits of doing it this way:
>
> 1.  Although you can restrict yourself to pure JUnit style tests if
> you want, you can also write a mix of tests, ranging from purely unit
> (extending TestCase and AndroidTestCase) to almost totally functional
> (e.g. extending ActivityInstrumentationTestCase) and group them
> together as a test suite.
>
> 2.  Although it doesn't work in the published SDK, quite soon you will
> in fact be able to run these tests directly from Eclipse.  In other
> words, because this is the supported mechanism, you'll benefit from
> upcoming improvements & tools.
>
> Hope this helps.
>
> --Andy
>
> On Fri, Mar 27, 2009 at 10:15 PM, gudujarlson  wrote:
>
> > I discovered that at least some of JUnit exists on the emulator. In
> > particular TestCase and Assert exist. However, TestRunner does not
> > appear to exist. I find it odd that only parts of JUnit are present.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: JUnit on the emulator without instrumentation

2009-04-05 Thread Andrew Stadler

It's actually quite useful and doable to write "pure" unit tests
within the InstrumentationTestRunner framework.

For a working example, please take a look at ApiDemos, in the tests/
directory, and look for classes that extend the "TestCase" class.

Benefits of doing it this way:

1.  Although you can restrict yourself to pure JUnit style tests if
you want, you can also write a mix of tests, ranging from purely unit
(extending TestCase and AndroidTestCase) to almost totally functional
(e.g. extending ActivityInstrumentationTestCase) and group them
together as a test suite.

2.  Although it doesn't work in the published SDK, quite soon you will
in fact be able to run these tests directly from Eclipse.  In other
words, because this is the supported mechanism, you'll benefit from
upcoming improvements & tools.

Hope this helps.

--Andy



On Fri, Mar 27, 2009 at 10:15 PM, gudujarlson  wrote:
>
> I discovered that at least some of JUnit exists on the emulator. In
> particular TestCase and Assert exist. However, TestRunner does not
> appear to exist. I find it odd that only parts of JUnit are present.
>
> >
>

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



[android-developers] Re: JUnit on the emulator without instrumentation

2009-03-27 Thread gudujarlson

I discovered that at least some of JUnit exists on the emulator. In
particular TestCase and Assert exist. However, TestRunner does not
appear to exist. I find it odd that only parts of JUnit are present.

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



[android-developers] Re: JUnit on the emulator without instrumentation

2009-03-25 Thread gudujarlson

Assuming there is no easy way to make use of android.test without
instrumentation, has anyone tried to do their own port of JUnit (or
similar framework) to the android platform? On Windows Mobile I am
using NUnitLite. Does JUnitLite exist?


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