How to test Android Application
Android testing suits are based on JUnit. Use JUnit to test a class but don't call Android API.If your new to android, use general purpose test cases such as AndroidTestCase.
Android Test cases can be run on Eclipse IDE or any other IDE.
Activity Testing: Activity testing base class is InstrumentationTestCase, which provides instrumentation to test case.
Service Testing: Android provides service framework for testing service objects. We have to test the life cycle of service, such as onCreate() or onStartCommand().
Content Provider Testing:
Android uses content providers to fetch the data and to store the data.The base test case class for content providers is ProviderTestCase2.
UI testing: UI testing is more important in case of mobile application. Its also important to test application user interface.
How to test UI:
1. Install application on the test device and analyse UI components.
2. Create Automated tests to simulate UI, Compile test cases into a JAR file by installing it in test device.
3. Run the test and correct the bugs.
Why Manual testing:
In Mobile devices, varies the hardware from device model to model or manufacturer to manufacturer. So it is important to test the application in the hardware device even though simulating in the emulator. We cannot check the camera, Bluetooth, gps functionality in the emulator. So, use android test device for testing the application.