I have a couple of simple tests, like assertNotNull(mActivity); (I’m reading M.D.Torres “Android Application Testing Guide”). The activity under test runs okay. Every single test runs okay as well. But if I run several tests at once on the second test getActivity() never returns. No errors in logcat (last line “Starting Intent …”), no nothing. Debugging doesn’t help much either, if I step into getActivity() it complains that there is no source code available.
Another test project – ActivityTesting from Google runs okay even with several tests, so Eclipse is configured right.
Did anybody ever encounter something like that?
I have a couple of simple tests, like assertNotNull(mActivity); (I’m reading M.D.Torres Android Application
Share
I recreated test project once more (like “clean room”) and it worked. Then I compared two projects and found the culprit. It was empty teardown:
If I remove it, all tests run green. If I paste it back, second test hangs. Now I would like to read the explanation and ready to mark it as answer.
Edit: I should be calling
super.tearDown()at the end of thetearDownmethod.Sorry for bothering everybody.