Adding Test Classes

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

bullet
To add test classes
  1. In the lower-left corner of the test navigator, click the Add button.

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

    ../Art/new_test_class_2x.png../Art/new_test_class_2x.png
  3. Enter a name for the class, choose the superclass, and click Next.

    ../Art/new_test_class_name_2x.png
  4. Select a destination, group, and target, and click Create.

    ../Art/new_test_class_dest_2x.png

    A new bundle and class are added to the test navigator, including stub implementations for the setUp, tearDown, and testExample methods.

    ../Art/new_test_class_created_2x.png
  5. Complete the stub implementations, and add other code as necessary.