Do not import any unit test methods or classes.
The libraries will not be available at runtime on the device and you will get NoClassDefFoundErrors for everything from Assert to hamcrest Matchers. It's reflex to type "import static org.hamcrest...." or "import static org.junit...." etc at the top of your test fixture class, but resist the habit when developing for Android.
Just extend ActivityInstrumentationTestCase2 and call the assertion methods that you inherit, like so:
assertTrue(message, condition);Note that it's not Assert.assertTrue().
Aside from that, following Google's Hello Testing guide will work without gotchas.
Thanks for sharing us this kind of information sloving software solution and it help me a lot in my research will be back soon
ReplyDeleteBespoke Software