Hi, I'm trying to write some functional unit-tests that involve multiple activities (end-to-end testing). I have great trouble to write stable tests, especially when ActivityMonitors are involved.
When my root-activity starts another activity, i try to use ActivityMonitors to check if the other activity has started. I use the activityMonitor.waitForActivityWithTimeout(timeout) (where activityMonitor is a non-blocking activity monitor for 'AnotherActivity.class.getName()'). The problem is that waitForActivityWithTimeout sometimes works fine and returns the instance of AnotherActivity. However, often it just waits for 'timeout' milliseconds and returns null and my root-activity is still considered the 'active' or 'last' activity. But when i check the screen, the AnotherActivity has been showing! Should i be using ActivityInstrumentationTestCase2? Or some other test- case class? How does one write reliable, non-fragile, functional unit-tests spanning multiple activities? Thank you! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

