Issue
I've been struggling with getting instrumented unit tests properly working for my android project, as when I make a test class and use ActivityTestRule to run my activity, each individual test runs - but despite returning either as a success or failure, the test just never ends. Everything works as intended, but the tests don't end, and so each test has to be ran on its own, then manually ended. Does anyone have any idea why this might be the case?
Solution
Found out the problem, scottymack pointed me in the right direction - I had a thread that constantly updated a View, and for some reason, ActivityTestRule didn't call onPause and onDestroy methods that would normally be called on shutdown. All it took was putting those in an @After method.
Answered By - Bladesy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.