O'Reilly logo

Xcode® 4 by Richard Wentk

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

Chapter 17: Creating Unit Tests

In This Chapter

Introducing unit testing Understanding unit testing in Xcode Creating a project for unit testing Creating a test case Running tests

Unit testing is a powerful software engineering technique that's supported in Xcode. This chapter outlines the technique so you can understand the theory behind unit testing, and it explains how to use unit testing in practice.

Introducing Unit Testing

You can test software in many ways, and software engineering has evolved formal processes that can simplify design and improve project efficiency.

Software can fail in five ways:

bl.eps The conceptual model for the user interface is misleading, incorrect, or inconsistent. If typical users make wrong assumptions about the software, the developer has made wrong assumptions about how users think and how they expect the software to work. Failures at this level may not be critical, but they frustrate users and waste their time.

bl.eps The UI is fragile. Common and inevitable user errors—such as whitespace in text, null entries, misspellings or invalid characters, or accidental mouse clicks—cause the application to fail.

bl.eps The UI or underlying model isn't secure. Deliberate ...

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