2016-09-28 62 views
1

开发人员在我们的应用程序中实现了pullToRefresh以更快加载信息。然而,当这个屏幕被加载时,这使我们的测试失败。我们也为视图设置了闲置资源,但仍然超时。当我们调试一切相应的工作。所以看起来刷新功能并没有放开线程。Espresso:pullToRefresh导致Espresso超时

该错误将声明上一个操作没有发生,并且还会显示有空闲超时但将空闲类型留空。

错误消息:

android.support.test.espresso.PerformException: Error performing 'performing ViewAction: single click on item matching: view holder with store front category: CATEGORY' on view 'with id: com.COMPANY.espresso:id/category_list'. 
at android.support.test.espresso.PerformException$Builder.build(PerformException.java:83) 
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:80) 
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:56) 
at android.support.test.espresso.ViewInteraction.runSynchronouslyOnUiThread(ViewInteraction.java:184) 
at android.support.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:115) 
at android.support.test.espresso.ViewInteraction.perform(ViewInteraction.java:87) 
at com.COMPANY.espresso.pages.StorePage.chooseStoreFrontCategory(StorePage.java:59) 
at com.COMPANY.espresso.tests.SanityTest.testUserCanAddSflyImageToProductandCart(SanityTest.java:112) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) 
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) 
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) 
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) 
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) 
at android.support.test.internal.statement.UiThreadStatement.evaluate(UiThreadStatement.java:55) 
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:270) 
at org.junit.rules.RunRules.evaluate(RunRules.java:20) 
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) 
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) 
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) 
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) 
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) 
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) 
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) 
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) 
at org.junit.runners.ParentRunner.run(ParentRunner.java:363) 
at org.junit.runners.Suite.runChild(Suite.java:128) 
at org.junit.runners.Suite.runChild(Suite.java:27) 
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) 
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) 
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) 
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) 
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) 
at org.junit.runners.ParentRunner.run(ParentRunner.java:363) 
at org.junit.runner.JUnitCore.run(JUnitCore.java:137) 
at org.junit.runner.JUnitCore.run(JUnitCore.java:115) 
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59) 
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262) 
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1992) 
Caused by: android.support.test.espresso.PerformException: Error performing 'single click - At Coordinates: 359, 933 and precision: 16, 16' on view 'CardView{id=2131886422, res-name=card_store_front_item, visibility=VISIBLE, width=660, height=440, has-focus=false, has-focusable=false, has-window-focus=false, 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=30.0, y=552.0, child-count=1}'. 
at android.support.test.espresso.PerformException$Builder.build(PerformException.java:83) 
at android.support.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:100) 
at android.support.test.espresso.contrib.RecyclerViewActions$ActionOnItemAtPositionViewAction.perform(RecyclerViewActions.java:303) 
at android.support.test.espresso.contrib.RecyclerViewActions$ActionOnItemViewAction.perform(RecyclerViewActions.java:232) 
at android.support.test.espresso.ViewInteraction$1.run(ViewInteraction.java:144) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) 
at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
at android.os.Handler.handleCallback(Handler.java:739) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:155) 
at android.app.ActivityThread.main(ActivityThread.java:5725) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1030) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:825) 
Caused by: android.support.test.espresso.AppNotIdleException: Looped for 3215 iterations over 60000 MILLISECONDS. The following Idle Conditions failed . 
at android.support.test.espresso.IdlingPolicy.handleTimeout(IdlingPolicy.java:61) 
at android.support.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:480) 
at android.support.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:411) 
at android.support.test.espresso.base.UiControllerImpl.injectMotionEvent(UiControllerImpl.java:229) 
at android.support.test.espresso.action.MotionEvents.sendUp(MotionEvents.java:138) 
at android.support.test.espresso.action.MotionEvents.sendUp(MotionEvents.java:118) 
at android.support.test.espresso.action.Tap.sendSingleTap(Tap.java:135) 
at android.support.test.espresso.action.Tap.access$100(Tap.java:35) 
at android.support.test.espresso.action.Tap$1.sendTap(Tap.java:40) 
at android.support.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:98) 
... 13 more 

TL/DR - 测试中表现 - 然后拉到刷新加入 - 测试不起作用。

+0

你可以发布你的空闲资源吗? –

回答

0

这是由Pull To Refresh框架中的错误引起的。更新构建SDK解决了这个问题。