I had an issue to run my ui test
@Test
fun firstUi() {
onView(withId(R.id.home_profile_tab)).perform(click())
onView(withId(R.id.enter)).perform(click())
onView(withId(R.id.tvCountryCode)).check(matches(withText("+964")))
}
This test run and passed
But the issue is, after running test and reaching to first line, the firs perform(click))
executed after around 90 seconds, and it is almost constant and every time it takes 90 seconds
But after that (90sec) other lines executed and test completed around 4 seconds and passed successfully
Base on android documentation:
Each time your test invokes
onView()
, Espresso waits to perform the corresponding UI action or assertion until the following synchronization conditions are met:The message queue is empty.
There are no instances of AsyncTask currently executing a task.
All developer-defined idling resources are idle.
So how and where can I investigate more to detect to root cause of issue???
Or what I'm doing wrong???