When to use TestCase, InstrumentationTestCase or AndroidTestCase

by Mihai Fonoage » Wed, 03 Mar 2010 02:39:48 GMT

Sponsored Links
 Hi navin,

would use ActivityInstrumentationTestCase2; for testing some part of
your activity in isolation you would use an InstrumentationTestCase;
for unit testing, if you use JUnit 4.x version, you just need to
annotate your class methods appropriately (don't need to extend/
implement anything).

I have some examples (and some additional details) of all this if it

Mihai Fonoage


When to use TestCase, InstrumentationTestCase or AndroidTestCase

by navin » Wed, 03 Mar 2010 18:23:31 GMT

 Hi Mihai,

Thanks for the post, it did helped. And also your post on the unit and
functional testing..that was very helpful. In any chance have you
developed any test case and included in CTS?? also if you can explain
something about AndroidTestCase class and why specifically use it when
we have the InstrumentationTestCase and
ActivityInstrumentationTestCase2...i want to include my test case in
CTS package and then compile the whole package..if you have any idea
regarding the same..please do reply.



Sponsored Links

Other Threads

1. Recieveing a notification when an activity is launched

On Wed, Jun 30, 2010 at 5:31 AM, Christoffer Davidsson

No, sorry.

Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training


2. chrome

Hi, how is it that we don't have Google Chrome on android yet? And do
you know when froyo is out on HTC LEGEND?

Ryan Hammill


3. Beli Aplikasi di market tanpa harus ROOTED?

4. Mirink di Yogya

5. init.rc commands not interprete

6. OOT: Happy Birthday Hendro Gunawan

7. play RTSP stream using MediaPlayer or VideoView