O'Reilly logo

Xcode 7 Essentials - Second Edition by Jayant Varma, Brett Ohland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing in Xcode

There are three types of tests that you can run in Xcode:

  • Functional Unit tests: These verify that a piece of code has an expected outcome
  • Performance tests: These tell you how long a piece of code took to run, optionally comparing that time to a baseline value
  • User Interface tests: These simulate a user interacting with your UI to test outcomes

Before we discuss each of these types of tests in detail, we need to check out how Xcode integrates with testing.

The test navigator

Open the test navigator by pressing Cmd + 5 on the keyboard or selecting its icon at the top of the navigator sidebar. Here, you will see a list of all the test classes and methods that have been written for your application. If you have no tests, this navigator ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required