The framework runs the instrumentation independently of the app, so it can
do what it wants when it wants. And an activity is not "the app".
Activities are created all the time, you can't wait for whatever one to be
created before running the instrumentation.
http://developer.android.com/referenc
"There are APIs to allow you to run code on the main thread to access
its objects." I'm a little confused about what APIs you are talking
about and how they would help solve this problem. Could you clarify?
To me it seems that the test runner should not be calling my tests if
the Application is n
You are calling this while the app is running, and it hasn't finished
initializing.
Generally you should be very careful about directly touching app objects
like this from tests, since the test is running in a separate thread. There
are APIs to allow you to run code on the main thread to access i
3 matches
Mail list logo