page.title=Testing Your Android Activity page.tags=testing trainingnavtop=true startpage=true @jd:body
You should be writing and running tests as part of your Android application development cycle. Well-written tests can help you to catch bugs early in development and give you confidence in your code.
A test case defines a set of objects and methods to run multiple tests independently from each other. Test cases can be organized into test suites and run programmatically, in a repeatable manner, with a test runner provided by a testing framework.
The lessons in this class teaches you how to use the Android's custom testing framework that is based on the popular JUnit framework. You can write test cases to verify specific behavior in your application, and check for consistency across different Android devices. Your test cases also serve as a form of internal code documentation by describing the expected behavior of app components.