Reputation: 3037
As there is JUnit test tool for Desktop java, is there some thing similiar in android so one can apply on android also?
Upvotes: 0
Views: 808
Reputation: 2220
You want to look into robolectric in order to run JUnit or any unit test locally on the JVM rather then device. The android.jar only contains stubs which will throw Runtime exceptions every time you hit it. To overcome this problem, robolectric shadows the android.jar which in terms lets you run local unit test.
Upvotes: 0
Reputation: 1006549
JUnit is available inside of Android, along with Android-specific test case base classes, to help exercise activities, services, etc.
Upvotes: 3