Espresso Test case is keep on failing in Android Watch

I have a single test case for finding the button, clicking on that to show number picker dialog.But this test case is keep on failing in android watch with below exception

android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching

(or)

----- begin exception -----

E/TestRunner: java.lang.ClassNotFoundException:

(or)

E/AndroidRuntime: FATAL EXCEPTION: Instr: androidx.test.runner.AndroidJUnitRunner

java.lang.OutOfMemoryError:

Sometimes ,Exception will be different.

I guess,Since watch Screen is not always visible,That is why test cases are failing.Anyone is having idea on this

Thanks in advance

what are you trying to achieve?

4 Likes