Espresso test is not finishing and it keeps on finding element when there is an issue in the application

140
April 29, 2022, at 11:30 PM

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);
}
Answer 1

You could add a timeout rule. E.g. Rule to timeout after 2 minutes

@get:Rule val globalTimeout: Timeout = Timeout.seconds(120)
Rent Charter Buses Company
READ ALSO
Shall I downgrade the installed version of Kotlin plugin in Android Studio?

Shall I downgrade the installed version of Kotlin plugin in Android Studio?

I am getting a warning as I build an Android Kotlin w/ Jetpack compose app with Android Studio like this:

115
Problem in Android AudioStream class in new API 32

Problem in Android AudioStream class in new API 32

The AudioStream class in API 32 is having a problem with the join method, what does it do together with the AudioGroup class, I just opened a call for Google but the same ones didn't help me, someone has the same problem or I've gone through something...

108
Checking the application loading speed on Android device

Checking the application loading speed on Android device

I have some web development experiences and today I started learning FlutterI made a really basic app, that displays a time in different countries

79
Difference between buffers in Kotlin flow

Difference between buffers in Kotlin flow

As far as I know there are three types of buffers in Kotlin flow: Buffer, Conflate and CollectLatest and I'm having trouble figuring out the differences between these three terminal operators

128