KakaoCup / Kakao

Nice and simple DSL for Espresso in Kotlin
https://kakaocup.github.io/Kakao/
Apache License 2.0
325 stars 28 forks source link

android.support.test.espresso.PerformException: Error performing 'fast swipe' #33

Closed TheReprator closed 3 years ago

TheReprator commented 3 years ago

The test is passing 90 percent of the time but failing randomly with below exception, as follows,

android.support.test.espresso.PerformException: Error performing 'fast swipe' on view 'with id: my.app.package:id/my_refresh_layout'. ... Caused by: java.lang.RuntimeException: Action will not be performed because the target view does not match one or more of the following constraints: at least 90 percent of the view's area is displayed to the user. Target view: "SwipeRefreshLayout{id=2131689751, res-name=my_refresh_layout, visibility=VISIBLE, width=480, height=672, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}"

Repository: https://github.com/TheReprator/Wipro/blob/image_error/appModules/factList/src/androidTest/kotlin/reprator/wipro/factlist/test/FactListFragmentTest.kt

TestName: swipeToRefresh

Regards, Vikram Singh

Vacxe commented 3 years ago

@TheReprator for future investigation of flakiness I can suggest to use test runner https://github.com/MarathonLabs/marathon to be able download screen video records for next investigation. Unfortunately, UI tests can be flaky and you also can use retry strategies from test runner or lazy flakiness support from Kaspresso