Re: [android-developers] Re: When to use TestCase, InstrumentationTestCase or AndroidTestCase
Hi Navin, I have not used AndroidTestCase (though I guess you read the API documentation for the class). Regarding CTS, no I have not, sorry. Mihai On Wed, Mar 3, 2010 at 5:23 AM, navin wrote: > 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. > > Thanks. > Navin. > > On Mar 2, 11:39 pm, Mihai Fonoage wrote: > > Hi navin, > > > > From what I know, for functional testing your entire activity, one > > woulduseActivityInstrumentationTestCase2; for testing some part of > > your activity in isolation you woulduseanInstrumentationTestCase; > > for unit testing, if youuseJUnit 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 > > helps: > http://dtmilano.blogspot.com/2009/07/android-testing-on-android-platf...http://mihaifonoage.blogspot.com/2010/01/unit-and-functional-testing-. > .. > > > > Mihai Fonoage > > > > On Mar 2, 7:44 am, navin wrote: > > > > > hi, > > > > > I am trying to figure out while writing a test case for android most > > > of the classes extend either of these.. > > > > > 1. AndroidTestCase > > > 2.InstrumentationTestCase > > > 3. ActivityInstrumementationTestCase2 > > > 4. TestCase > > > > > My doubt is which one we have tousewhile writing a new test ?? i > > > mean on what criteria we have to write the test case for either of the > > > above base classes?? > > > > > Navin. > > -- > 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 > -- 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: When to use TestCase, InstrumentationTestCase or AndroidTestCase
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. Thanks. Navin. On Mar 2, 11:39 pm, Mihai Fonoage wrote: > Hi navin, > > From what I know, for functional testing your entire activity, one > woulduseActivityInstrumentationTestCase2; for testing some part of > your activity in isolation you woulduseanInstrumentationTestCase; > for unit testing, if youuseJUnit 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 > helps:http://dtmilano.blogspot.com/2009/07/android-testing-on-android-platf...http://mihaifonoage.blogspot.com/2010/01/unit-and-functional-testing-... > > Mihai Fonoage > > On Mar 2, 7:44 am, navin wrote: > > > hi, > > > I am trying to figure out while writing a test case for android most > > of the classes extend either of these.. > > > 1. AndroidTestCase > > 2.InstrumentationTestCase > > 3. ActivityInstrumementationTestCase2 > > 4. TestCase > > > My doubt is which one we have tousewhile writing a new test ?? i > > mean on what criteria we have to write the test case for either of the > > above base classes?? > > > Navin. -- 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: When to use TestCase, InstrumentationTestCase or AndroidTestCase
Hi navin, >From what I know, for functional testing your entire activity, one 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 helps: http://dtmilano.blogspot.com/2009/07/android-testing-on-android-platform_7528.html http://mihaifonoage.blogspot.com/2010/01/unit-and-functional-testing-in-android.html Mihai Fonoage On Mar 2, 7:44 am, navin wrote: > hi, > > I am trying to figure out while writing a test case for android most > of the classes extend either of these.. > > 1. AndroidTestCase > 2. InstrumentationTestCase > 3. ActivityInstrumementationTestCase2 > 4. TestCase > > My doubt is which one we have to use while writing a new test ?? i > mean on what criteria we have to write the test case for either of the > above base classes?? > > Navin. -- 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