TestKit Documentation
To run your tests, you'll need to compile them into an NSBundle. The bundle form was chosen because it is a grouping of code and resources. Many non trivial tests involve not only the code being tested, but external files.

There are a couple ways to create a test bundle. TestKit installs a test bundle template that will run the test bundle as the last step of the build process. Failed tests will show up in the build progress window, and cause the build to fail. To create a test bundle from the template:

  1. Select Project->New Target...
  2. Choose TestKit->Test Bundle
  3. Click Next
  4. Select a name for your test bundle
  5. Click Finish
  6. Verify that your test bundle includes the TestKit framework. If not, add it. You may need to add the TestKit framework to your project
  7. Add you test cases to the test bundle
  8. Add any resources your tests depend on to the bundle
Principal Class
By default, the testing tools provided with TestKit will run every test case found in a test bundle. To gain more control over which tests are run, you may specify a Principal Class for your test bundle. If TestRunner determines that a specific Principal Class has been indicated in your test bundle, then only that class will be considered for executing tests. If that class, in turn, implements the +suite method, then only the test/suite returned from that method will be run.

See NSBundle's documentation for more information on bundles.