简体   繁体   English

iPhone自动单元测试用例

[英]automated unit test case for iphone

for last three days i am trying to create unit test case using OcUnit. 在过去的三天内,我尝试使用OcUnit创建单元测试用例。 but not succeed yet . 但还没有成功。 every time i google i get new tutorial with different configuration. 每当我谷歌我得到新的教程,不同的配置。 and apple tutorial is the only which worked in xcode 3.2.5 . 苹果教程是唯一在xcode 3.2.5中可用的教程。 plz if any one know step to create logic test as well as application test please let me know . 请告诉我一下创建逻辑测试以及应用测试的步骤。

Apple's approach forces you to make an artificial and unnecessary distinction between "logic tests" and "application tests". 苹果公司的方法迫使您在“逻辑测试”和“应用程序测试”之间进行人为的不必要的区分。 It also makes debugging a real pain. 这也使调试变得很痛苦。

For iOS unit testing, try GTM or GHUnit instead. 对于iOS单元测试,请改用GTMGHUnit

Update: Xcode 4 changes everything. 更新: Xcode 4改变了一切。 I now use the built-in OCUnit for iOS unit tests. 现在,我将内置的OCUnit用于iOS单元测试。 See Xcode Unit Testing: The Good, the Bad, the Ugly 请参阅Xcode单元测试:好,坏,丑

i use GHUnit, is a test framework for Objective-C, you can follow the instruction on the GHUnit page or see the video TDD for iPhone Development , GHUnit it's easy to use and very helpful. 我使用GHUnit,它是Objective-C的测试框架,您可以按照GHUnit页面上的说明进行操作,也可以查看iPhone开发的TDD视频,GHUnit易于使用且非常有用。

hope this help. 希望有帮助。

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

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