leave Android app in final state on espresso test

2019-04-11 21:35发布

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?

1条回答
干净又极端
2楼-- · 2019-04-11 22:24

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

查看更多
登录 后发表回答