I have been looking for a solution to this as well, and it seems that
Android provides no working approach for doing this.

You might want to take a look at http://code.google.com/p/robotium/
and see if that works for the specific cases you are testing.  I'd be
interested to hear if it works for you.

Cheers,
--Aaron V.

On May 25, 6:16 pm, Streets Of Boston <[email protected]> wrote:
> I guess nobody can help me with this question... :(
>
> On May 20, 10:13 am, Streets Of Boston <[email protected]>
> wrote:
>
>
>
> > Buehler, anyone? Buehler...? :-)
>
> > On May 18, 11:33 pm, Streets Of Boston <[email protected]>
> > wrote:
>
> > > Hi,
>
> > > I'm trying to write some functional unit-tests that involve multiple
> > > activities (end-to-endtesting).
> > > 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 
> > > athttp://groups.google.com/group/android-developers?hl=en
>
> > --
> > 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 
> > athttp://groups.google.com/group/android-developers?hl=en-Hide quoted text -
>
> > - Show quoted text -

-- 
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

Reply via email to