- Test-Driven iOS Development with Swift 4(Third Edition)
- Dr. Dominik Hauser
- 322字
- 2021-07-02 15:39:39
TDD in Xcode
In 1998, the Swiss company Sen:te developed OCUnit, a testing framework for Objective-C (hence, the OC prefix). OCUnit was a port of SUnit, a testing framework that Kent Beck had written for Smalltalk in 1994.
With Xcode 2.1, Apple added OCUnit to Xcode. One reason for this step was that they used it to develop Core Data at the same time that they developed Tiger, the OS with which Core Data was shipped. Bill Bumgarner, an Apple engineer, wrote this later in a blog post:
Apple realized how valuable unit tests can be when developing complex systems in a changing environment. They wanted third-party developers to benefit from unit tests as well. OCUnit could be (and has been) added to Xcode by hand before version 2.1. But by including it into the IDE, the investment in time that was needed to start unit testing was reduced a lot, and as a result, more people started to write tests.
In 2008, OCUnit was integrated into the iPhone SDK 2.2 to allow unit testing of iPhone apps.
Finally, in 2013, unit testing became a first-class citizen in Xcode 5 with the introduction of XCTest. With XCTest, Apple added specific user interface elements to Xcode that helped with testing, which allowed running specific tests, finding failing tests quickly, and getting an overview of all the tests. We will go over the testing user interface in Xcode later in this chapter. But, first, we will take a look at TDD using Xcode in action.
- Fundamentals of Linux
- 構建移動網站與APP:HTML 5移動開發入門與實戰(跨平臺移動開發叢書)
- 名師講壇:Spring實戰開發(Redis+SpringDataJPA+SpringMVC+SpringSecurity)
- KnockoutJS Starter
- 表哥的Access入門:以Excel視角快速學習數據庫開發(第2版)
- 移動界面(Web/App)Photoshop UI設計十全大補
- Linux Shell核心編程指南
- R語言數據可視化:科技圖表繪制
- C編程技巧:117個問題解決方案示例
- Instant Automapper
- 深度實踐KVM:核心技術、管理運維、性能優化與項目實施
- Instant Apache Camel Messaging System
- Unity 3D UI Essentials
- Moodle 3.x Developer's Guide
- Unreal Engine Game Development Cookbook