Reputation: 406
I have the espresso test. When there is any issue in the app the test is not finishing and it keeps on staying on the same screen. Is there anyway we can give timeout for the espresso test. I cant find solution for the global timeout. Junit Android Espresso Test
@Before
public static void beforeClass() {
IdlingPolicies.setMasterPolicyTimeout(10, TimeUnit.SECONDS);
IdlingPolicies.setIdlingResourceTimeout(10, TimeUnit.SECONDS);
}
Upvotes: -1
Views: 695
Reputation: 91
You could add a timeout rule. E.g. Rule to timeout after 2 minutes
@get:Rule val globalTimeout: Timeout = Timeout.seconds(120)
Upvotes: 2