【问题标题】:UI Automation Instruments: How to reset the app state?UI Automation Instruments:如何重置应用程序状态?
【发布时间】:2013-11-06 08:10:29
【问题描述】:

我是 UI Automation with Instruments 的新手,但我还没有找到重置应用状态的方法。我应该如何防止测试相互影响?我还没有找到使用 setUp 或 tearDown 方法的方法?如果有人对我有建议,那就太好了 - 非常感谢!

我在退出旧博客文章中读到这是不可能的?另一方面,Appium 能够做到这一点,而且它实际上是在使用 Instruments - 所以一定有办法吗?

最好的问候, 丹尼尔

【问题讨论】:

    标签: ios testing automated-tests instruments


    【解决方案1】:

    我认为唯一的方法是重新启动应用程序。 你可以查看这个问题How to continue testing an iOS app, using UIAutomation instrument, even after the app exits?

    【讨论】:

    • 嗨,感谢您的回答,但文档说: UIATarget.localTarget().deactivateAppForDuration(n); “当用户通过点击主页按钮或导致其他应用程序进入前台退出您的应用程序时,您的应用程序将被暂停。”所以基本上它不是重新启动应用程序而是处于暂停状态。
    • 重启不能解决。一方面,重启不会删除文件。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-06
    • 1970-01-01
    • 1970-01-01
    • 2017-06-17
    相关资源
    最近更新 更多