iPhone单元测试 [英] iPhone Unit Testing

查看:153
本文介绍了iPhone单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在大学的iPhone开发项目上完成了我的项目而没有进行有用的单元测试(只做了一些简单的单元测试)。

I finished my project on an iPhone dev at uni WITHOUT doing "useful" unit testing (did some simple ones just to put on my report).

我是看看苹果公司的单元测试服(逻辑和应用程序测试),但最终使用google-toolbox-for-mac中的iPhoneUnitTesting,我发现它有更多的文档记录,并且易于开始使用Java的单元测试知识。

I was looking at the apple's unit testing suits (logic and application tests) but ended up using iPhoneUnitTesting from google-toolbox-for-mac, which I found more documented and easy to get started with Java's unit testing knowledge.


  1. 你们当中有多少人实际使用此而不是Apple的原生单位测试套装?

  2. 关于这个主题的书籍的任何建议(iPhone的单元测试)?


推荐答案

我有关于 iPhone单元测试的系列文章。最初,我探索了OCUnit(Xcode),Google Toolbox for Mac(GTM)和GHUnit。测试方面,我更喜欢Xcode内置的单元测试(OCUnit)。在视觉上我更喜欢GHUnit用于GUI界面。 Xcode 4的测试支持从Xcode 3大大改进。

I have a series on iPhone Unit Testing. Initially, I explored OCUnit (Xcode), Google Toolbox for Mac (GTM) and GHUnit. Testing wise, I prefer the Xcode built in unit tests (OCUnit). Visually I prefer GHUnit for the GUI interface. Xcode 4's testing support is much improved from Xcode 3.

如果您需要在设备上进行GUI测试,可以稍后添加GHUnit,因为它建立在GTM并且可以运行OCUnit和GTM单元测试。

If you need a GUI on the device for testing, you can add GHUnit later, since it is built on top of GTM and can run OCUnit and GTM unit tests.

  • iPhone Unit Testing Explained Part I
  • iPhone Unit Testing Explained Part II

这篇关于iPhone单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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