iPhone Unitesting using SenTestingKit. One LogicTest.m file and target file for all?
I recently started looking into how I can unit test my application. I configured my Xcode environment following Apple's iOS_Development_Guide in chapter 7 and I've run the sample LogicT开发者_开发百科ests Target file which is now dependent with my Application's target.
My Question now is: Am I supposed to create a new test-case class file for every Class file of my app and link it to the LogicTests target file?
What is the best approach for unit testing and existing application?
Thanks
You create a new test case for each "unit" that you would like to test. A typical convention is that you have one test class per actual class, but you don't have to, you can have one test class per feature, for example.
Off-topic: Take a look at GHUnit. It's so much more pleasant to work with than SenTestingKit.
精彩评论