Closed GoogleCodeExporter closed 9 years ago
Try startActivitySync(Intent intent) instead.
Original comment by renasr...@gmail.com
on 6 May 2011 at 5:02
Original comment by renasr...@gmail.com
on 6 May 2011 at 5:02
Original comment by renasr...@gmail.com
on 10 May 2011 at 5:59
The point is that activity A needs to start B (which are both in the same app),
and B will return a result. The test is not starting it, A is. The whole point
of the test is that A starts B, and then gets back a result. I can use other
methods to see the appropriate screen details synchronously, so that isn't the
problem.
That said, I can deduce the activity is running, and I can deduce that it has
returned. My report wasn't that I could not _write_ the test, it was simply
that stating assertions related to the "current activity" are useless if you
don't actually _track_ the current activity...so then why have such methods in
your public interface?
This is not an invalid issue. It is a bug. The public facing API of you classes
doesn't work.
The documentation of the activity related methods should at least contain this:
NOTE: These methods cannot track the current activity if your code uses
startActivityForResult(). You should invent some other way of testing such
activity flow (e.g. examine what is on the screen).
Original comment by tony....@gmail.com
on 10 May 2011 at 3:39
Please note: you need to implement tearDown methods for the tests, like this:
@Override
public void tearDown() throws Exception {
solo.finishOpenedActivities();
super.tearDown();
}
If you skip it, it may lead to the described behavior.
(I'm not saying the issue is valid or invalid)
Original comment by kovmarc...@gmail.com
on 20 Mar 2014 at 3:44
Original issue reported on code.google.com by
tony....@gmail.com
on 6 May 2011 at 2:53