测试 iPhone 视图控制器:从哪里开始?
在开发应用程序时,我意识到我想在应用程序“外部”测试我的视图控制器(以及其他对象)。我发现了一篇关于测试视图控制器的很好的博客文章,然而,遗憾的是,我对任何类型的软件测试根本不熟悉。所以几乎所有写的东西都有点混乱。 我正在寻找一个好的起点,这是我的问题:
- 我认为阅读有关测试的一般内容会更有用。你会推荐什么?
- iOS 特定信息怎么样?关于OCUnit(现已集成在 Xcode 中)、OCMock(在那篇博客文章中提到)、UIAutomation 的教程?
- 我是否能够像独立应用程序一样“运行”单独的视图控制器(点击按钮、输入文本字段等),而无需明确制作此类应用程序?我可以使用什么工具来实现此目的?
- 您个人对此有何看法?
While developing an app I came to a point when I realized that I want to test my view controllers (and other objects as well) "outside" of the app. I've found a good blog post on testing view controllers, however, sadly enough, I'm not familiar with any kind of software testing at all. So almost everything written there is a bit confusing.
I'm looking for a good place to start and here are my questions:
- I suppose it would be more useful to read something general on testing. What would you recommend?
- What about iOS specific info? Tutorials on OCUnit (which is now integrated in Xcode), OCMock (which was mentioned in that blog post), UIAutomation?
- Will I be able to "run" a separate view controller like an independent app (to tap buttons, type in text fields, etc.) without explicitly making such app? What tool may I use for that purpose?
- What is your personal approach to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我强烈推荐此资源,因为它涉及您遇到的大多数问题:
http:// jojitsoriano.wordpress.com/2011/06/03/references-on-unit-testing-ui-automation-for-ios-applications/
希望有帮助!
I would greatly recommend this resource as it touches on most of the questions that you have:
http://jojitsoriano.wordpress.com/2011/06/03/references-on-unit-testing-ui-automation-for-ios-applications/
Hope that helps!