问题
Any advice on which way to go regarding Unit Testing on XCode 4 out of SenTestingKit (the inbuild unit testing framework with XCode 4) and GHUnit? In particular:
With the apparent improvements to Unit Testing in XCode 4 does this mean there are no major benefits of running with GHUnit?
Alternatively are there some integration benefits that make a smooth development process that could be achieved using XCode's unit testing framework (SenTestingKit) as opposed to GHUnit?
回答1:
Greg, I answered your question on my blog, about 2 weeks late :). The conclusion I came to is the GHUnit isn't obsolete, but you should use SenTestingKit for new projects on Xcode 4.
http://longweekendmobile.com/2011/04/15/unit-testing-in-xcode-4-use-ocunit-and-sentest-instead-of-ghunit/
回答2:
actually got some good feedback after also polling the apple forum community here https://devforums.apple.com/message/408448#408448
回答3:
I don't have in depth knowledge of both the Testings, One thing I read about is you can subclass GHUnit to use SenTest or GTMTestCase. Read This. I guess you can write both the test cases using GHUnit and having UI makes it real simple and fun to use.
来源:https://stackoverflow.com/questions/5455771/sentestingkit-integrated-with-xcode-versus-ghunit-on-xcode-4-for-unit-testing