简体   繁体   English

iOS 6状态保存和恢复的自动化测试

[英]Automated Testing of iOS 6 State Preservation and Restoration

I'm updating an app to use the new state preservation and restoration functionality in iOS 6. As far as I can tell the best guidance on testing this in apps involves doing it manually (eg http://www.absoluteripple.com/1/post/2012/09/ios-6-state-preservation-and-restoration.html ). 我正在更新一个应用程序,以便在iOS 6中使用新的状态保存和恢复功能。据我所知,在应用程序中测试此功能的最佳指导包括手动执行(例如http://www.absoluteripple.com/1 /post/2012/09/ios-6-state-preservation-and-restoration.html )。

Are there any ways to do automated testing of preserving and restoring state? 有没有办法自动测试保存和恢复状态?

Aside from manually running it as the link you provided specifies—or using something like the UI Automation instrument—your best bet is to test the integration points as units. 除了手动运行它作为您提供的链接指定 - 或使用类似UI自动化仪器之类的东西 - 您最好的选择是将积分点作为单位进行测试。 Instead of testing the entire system, test the individual methods you implement to ensure they interact with UIKit properly. 而不是测试整个系统,测试您实现的各个方法,以确保它们与UIKit正确交互。 Otherwise, you're just testing that Apple's code behaves consistently. 否则,您只是测试Apple的代码表现一致。

For new OS versions, you'll need to go in and test them holistically, but that's much less often than, say, every commit. 对于新的操作系统版本,您需要进入并对其进行全面测试,但这比每次提交都要少得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM