As far as I can tell, you've built your own version of the Email client, and now you're trying to test it.
To do this, you have to build both the client application and the test package. In general, to build a test package for an application you have to be able to build both of them from source. The test package and the application have to be signed with the same key, as a security feature. Once you build them, you need to install them to the device. Afterwards, you can change the application and re-install it without having to re-build or re-install the test package, and vice versa. You still have to use the same key each time. The process of installing applications and test packages is documented in the Dev Guide. Go to the Dev Guide tab under Developing and look at Building and Running and also Testing. You can certainly run tests as the last part of your build process. You can't do this easily in Eclipse, but you can do it by modifying your Ant scripts. You can also run unit tests during a build if you're testing a unit that doesn't depend on Android. To test something that needs to run on Android, such as an Activity, you have to build it into an application and install it on Android before you can test it. When you say "the best way to do it like native Android tests", you should look at the /tests subdirectory for the Email project. It should contain unit tests for the client. You can use them as a starting point for doing your own testing. elk. On Feb 11, 7:36 am, Oleg Popenov <popenov.o...@gmail.com> wrote: > Thanks for your response! > > But now I have some questions could you please answer? > > 1) As I understand it should be built at the same time with the > platform building. Any specific parameters to build? After build I > need to install them? How can I do that? > 2) Is there any way to run tests during building? Is it possible to > abort building if any tests failed? > > I made some changes in Adndroid platform and I need to test them. I > think the best way to do it like native Android tests. > > Appreciate any help. > Most sincerely, Oleg > > On Feb 10, 6:32 pm, Diego Torres Milano <dtmil...@gmail.com> wrote: > > > > > > > > > If > > > $ adb shell pm list instrumentation > > > output is empty, then you don't have any test installed. > > Install them first. > > > On Feb 9, 8:44 am, Oleg Popenov <popenov.o...@gmail.com> wrote: > > > > Hi, > > > > I've tried to run Instrumentation Tests on device from adb shell and I > > > get a > > > strange error, could you please help me? > > > If I run tests for any internal android application (email for example) as > > > it written in AndroidManifest.xml, > > > > * <!--* > > > * This declares that this app uses the instrumentation test runner > > > targeting > > > * > > > * the package of com.android.email. To run the tests use the command:* > > > * "adb shell am instrument -w > > > com.android.email.tests/android.test.InstrumentationTestRunner"* > > > * -->* > > > > then I get an error: > > > > *am instrument -w > > > com.android.email.tests/android.test.InstrumentationTestRunner > > > **INSTRUMENTATION_STATUS: id=ActivityManagerService > > > **INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: > > > Component > > > **Info{com.android.email.tests/android.test.InstrumentationTestRunner} > > > **INSTRUMENTATION_STATUS_CODE: -1 > > > **android.util.AndroidException: INSTRUMENTATION_FAILED: > > > com.android.email.tests/a* > > > *ndroid.test.InstrumentationTestRunner* > > > > * > > > * > > > The result of the command *'pm list instrumentation' *is empty. > > > How can I run tests? > > > > Thanks in advance! > > > Most sincerely, Oleg > > > -- > > Have you read my blog ?http://dtmilano.blogspot.com > > android junit tests ui linux cult thin clients -- 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