A quick blog on its basics. Its a bit crazy to read the developer.android.com site for this. So, you create a AndroidTestCase when you want to test a android application from test cases. So you have a screen with some data, buttons. Your test case will fill in the data, and press the buttons. Infact you can also call methods of your classes.
Now you ask, where will the test case get the application context for that app. Simple, when you set up a project with a class that extends AndroidTestCase, you also need to put in the following to your manifest. The test case launches and loads your applications and you can get a reference to your app context from super.getContext(). Cool ?? I think so..