Running Android Unit Test
Create a unit test based on AndroidTestCase then modify AndroidManifest to add:
Then select the class and run as "Android JUnit test"
<application android:icon="@drawable/icon" android:label="@string/app_name">
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:targetPackage="com.mypackagename.test"
android:name="android.test.InstrumentationTestRunner" />
Then select the class and run as "Android JUnit test"