慢速咖啡 [英] Slow down Espresso

查看:81
本文介绍了慢速咖啡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是关于浓缩咖啡的.我正在模拟器上成功运行集成测试.我认为某些测试失败了,因为它运行得太快了.有没有办法减慢执行/播放speeD的速度?

this is regarding Espresso. I am successfully running integration test on a simulator. I think some tests are failing because it's running too fast. Is there a way to slowdown the execution/playback speeD?

推荐答案

测试失败导致速度提高是不可能的. Espresso可以将所有测试操作与被测应用程序同步.默认情况下,Espresso等待当前消息队列中的UI事件处理并默认完成AsyncTasks,然后再继续进行下一个测试操作.但是,如果这对于您的应用程序来说还不够,您可以告诉Espresso何时空闲,何时不空闲.为此,您必须:

It's impossible that a test fails cause to speed. Espresso can synchronize all test operations with the application under test. By default, Espresso waits for UI events in the current message queue to process and default AsyncTasks to complete before it moves on to the next test operation. However if this is not enough for your application you can tell Espresso when to be idle and when not. To do so you have to :

  • 实施
  • Implement the IdlingResource interface.
  • Register one or more of your IdlingResource(s) with Espresso by calling Espresso.registerIdlingResource in test setup.

如果您需要更多帮助,请问我!

If you need more help ask me!!

这篇关于慢速咖啡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆