Issue
I am running Android instrumented tests using espresso.
I have a little more than 70 tests to be run which all click through different parts of my application.
When I run each test as a single test they all work and I get a green test result.
When I run them all at the same time (right click on the androidTest folder -> hit run) then some of them fail saying the view cannot be found.
In different runs different tests are failing. I think it might be that something is going too quickly here.
Do you guys have any suggestions on how to fix this? Thank you so much in advance!
Solution
in Setup your test environment section of Espresso setup instructions you have:
On your device, under Settings->Developer options disable the following 3 settings:
Window animation scale
Transition animation scale
Animator duration scale
animations may be related with your suspicion: something is going too quickly here
you may also use Thread.sleep(1000); (milliseconds) inside test methods for delaying some calls
anyway, without any code all above its just a guess...
Answered By - snachmsm
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.