The JUnit TestCase in Android should work. By default, the Eclipse plug-in will not build tests/ or its subdirectories into your application's .apk.
I recommend you have one project for your main application, and another *project* for your test package. Notice that two different projects in Eclipse can point to the same directory structure. The project for your main application will point to <root>/src, <root>/ res, etc. The project for your test package will point to <root>/tests/ src, <root>/tests/res, etc. The same value of <root> is used for both projects. You can do this with the Android New Project wizard or Android New Test Project wizard (in SDK 2.2 at least). When you create the test project's location, uncheck default location and then enter <root>/ tests What problem are you running into when you try to run a test package containing subclasses of junit.framework.TestCase? You need to run it with InstrumentationTestRunner. See the Android 2.2 documentation "Testing and Instrumentation" and also "Testing in Eclipse, with ADT". Or, you can use AndroidTestCase, which extends junit.framework.TestCase. On Aug 10, 4:33 am, ko5tik <[email protected]> wrote: > On Aug 10, 3:39 am, doug <[email protected]> wrote: > > > Oh well, It doesn't seem that the Eclipse plug-in would even run a > > test case subclassed directly from junit.framework.TestCase. How do > > folks test POJOs in Android then? > > Which junit.framework.TestCase you are using? One coming from > android library > will be just a stub > > I use jMockit to mock everything android in my testcases, and junit > coming from somewhere else -- 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

