Adding Test Classes

Expand the scope of your unit testing by adding test classes to a project.

To add test classes
  1. Click the Add button (+) in the test navigator filter bar.

  2. From the pop-up menu, choose New Test Class.

  3. Choose the Test Case Class template, and click Next.

  4. Enter a name for the class, choose the superclass and implementation language, and click Next.

  5. Select a destination, group, and target, and click Create.


    Xcode adds a new bundle and class to the test navigator, including stub implementations for the setUp, tearDown, testExample, and testPerformanceExample methods.

  6. Complete the stub implementations, and add other code as necessary.