Gav, Thanks for your reply. I created a separate project for the tests and the duplicated manifest file error is gone. I now have another problem. zlu-macbook:tests zlu$ adb shell am instrument -w zlu.followme/ android.test.InstrumentationTestRunner INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{zlu.followme/android.test.InstrumentationTestRunner} INSTRUMENTATION_STATUS: id=ActivityManagerService INSTRUMENTATION_STATUS_CODE: -1 INSTRUMENTATION_FAILED: zlu.followme/ android.test.InstrumentationTestRunner
I'm not sure how to fix that as the instrumentation info is in the manifest file: <instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="zlu.followme" android:label="Tests for FollowMe."/> I created a project for apidemos included in the sdk 1.5 and tried to run LocalServiceTest using "Run as Android JUnit test", which is new to ADT .9. I got error about not able to find instrumentation info similar to what I got above. I tried to run with the command: zlu-macbook:src zlu$ adb shell am instrument -w -e class com.example.android.apis.app.LocalServiceTest com.example.android.apis.tests/android.test.InstrumentationTestRunner INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.example.android.apis.tests/ android.test.InstrumentationTestRunner} INSTRUMENTATION_STATUS: id=ActivityManagerService INSTRUMENTATION_STATUS_CODE: -1 INSTRUMENTATION_FAILED: com.example.android.apis.tests/ android.test.InstrumentationTestRunner usage: am [start|broadcast|instrument|profile] It's obvious that these tests can be run and I have some kind of configuration issue but I don't know how since it's poorly documented. Has anyone gotten this to work in sdk1.5? Would the android team please provide some detailed setup information so i can ideally run these tests from with eclipse or at least be able to run them under commandline? Thanks, Zhao On Apr 14, 5:35 am, Gavin Aiken <gavin.ai...@imperial.ac.uk> wrote: > In my humble setup the test application is separate to the actual > application but references it so that the required classes can be used. > > http://code.google.com/p/miffed/source/browse/#svn/trunk/MiffedTest%3... > > As such I can choose to install Miffed (The name of my app) or MiffedTest. > Upon installation of the latter I can run tests from the command line as > descibed in the comments of AllTests; > > What you're referring to is a configuration requirement that predates 1.5 so > no doubt you can find the solution to this problem better explained within > this archive. > > http://groups.google.com/group/android-beginners/browse_thread/thread...http://dtmilano.blogspot.com/2008/11/android-testing-on-android-platf... > > Gav > > On Tue, Apr 14, 2009 at 8:43 AM, zlu <zhao.lu...@gmail.com> wrote: > > > Thanks for the link. I created a similar manifest file and got this > > error: > > > [2009-04-14 00:28:22 - followme] Error generating final archive: > > duplicate entry: AndroidManifest.xml > > > How do you fix that, now that I have 2 manifest files in different > > locations? > > > On Apr 13, 11:16 pm, Xavier Ducrohet <x...@android.com> wrote: > > > Looks at the manifest in > > > SDK/platforms/android-1.5/samples/ApiDemos/tests/AndroidManifest.xml > > > > Xav > > > > On Mon, Apr 13, 2009 at 11:13 PM, zlu <zhao.lu...@gmail.com> wrote: > > > > > I found this link: > > > >http://developer.android.com/guide/samples/ApiDemos/tests/src/com/exa. > > .. > > > > and wrote a very similar test. I tried to run it from Eclipse as > > > > android junit test and got this error: The application does not > > > > declare uses-library android.test.runner. > > > > How do I specify that? > > > > > On Apr 13, 9:51 pm, zlu <zhao.lu...@gmail.com> wrote: > > > >> There's better support for JUnit in 1.5. I'm trying to test-driven a > > > >> service class. I see ServiceTestCase.java in 1.5. My question is has > > > >> anyone written their own test case extending this (if it is supposed > > > >> to be extended)? I could find any example online and positron doesn't > > > >> see to have any support for testing services. > > > > >> Thanks, > > > > >> Zhao > > > > -- > > > Xavier Ducrohet > > > Android Engineer, Google. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---