在完成espresso测试后将Android应用置于最终状态 [英] leave Android app in final state on espresso test completion

查看:67
本文介绍了在完成espresso测试后将Android应用置于最终状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在浓缩咖啡测试结束时,是否可以将应用程序置于任何状态下进行测试?我不在乎它是失败还是成功.当我在开发功能以及对该功能进行测试时,仅使Instrumentation应用停止并在处于任何状态的情况下独自进行测试都是很有用的.这将使我能够手动或随意地玩游戏.附加调试器,看看发生了什么,而无需手动运行整个流程.

Is it possible to leave the app under test in whatever state it's in at the end of an espresso test? I don't care if it's failure or success. When I am working on developing a feature and a test for said feature it would be useful to just have the instrumentation app stop and leave the app under test alone in whatever state it happens to be in. This would allow me to play around manually or attach a debugger and see what is going on without running through the entire flow manually.

有人知道这是否可能吗?

Anyone know if this is possible?

推荐答案

有多个演员正在试图杀死您的活动...最后,我不得不提供一个自定义规则和一个自定义跑步者来获得我想要的行为.记录在这里:

There are multiple actors in play that try to kill your activities... finally I had to provide a custom rule and a custom runner to get the behavior I wanted. Documented here:

https://gist.github.com/dbachelder/4d0588ab6adf0aa6e69a

这篇关于在完成espresso测试后将Android应用置于最终状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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