Test-Driven iOS Development with Swift 3, 2/e (Paerback)

Dr. Dominik Hauser

買這商品的人也買了...

相關主題

商品描述

Key Features

  • Learn test-driven principles to help you build apps with fewer bugs and better designs
  • Become more efficient while working with Swift to move on to your next project faster!
  • Implement all of the principles of test-driven development (TDD) in to your daily programming workflow

Book Description

Test-driven development (TDD) is a proven way to find software bugs early. Writing tests before your code improves the structure and maintainability of your apps. In combination with the improved syntax of Swift 3, there is no excuse or writing bad code.

This book will help you understand the process of TDD and how it impacts your apps written in Swift. Through a practical, real-world example app, you’ll start seeing how to implement TDD in context. You will begin with an overview of the TDD workflow and then deep dive into unit testing concepts and code cycles. You will also plan and structure your test driven iOS app, and write tests to drive the development of the view controllers and the helper classes. Next, you’ll learn how to write tests for network code, what CI is and how to set it up using Xcode Server.

Finally, the book will guide you through the next steps to become a testing expert by discussing integration tests, Behavior Driven Development (BDD), open source testing frameworks and UI Tests introduced in Xcode 8.

What you will learn

  • Implement TDD in Swift application development
  • Find bugs before you enter the code using the TDD approach
  • Use TDD to build models, view controllers, and views
  • Test network code with asynchronous tests and stubs
  • Write code that is a joy to read and to maintain
  • Develop functional tests to ensure the app works as planned
  • Employ continuous integration to make testing and deployment easier

About the Author

Dr. Dominik Hauser completed his Ph.D. from the University of Heidelberg in Physics. While working as a university professor, he started iOS development in his spare time. His first app on Physics has been an astounding success worldwide. Since then, he turned himself into a full-time iOS developer, crediting number of successful apps to his name. He has been a Swift developer since day one and runs a blog on iOS development, www.swiftandpainless.com.

Table of Contents

  1. Your First Unit Tests
  2. Planning and Structuring Your Test-Driven iOS App
  3. A Test-Driven Data Model
  4. A Test-Driven View Controller
  5. Testing Network Code
  6. Putting It All Together
  7. Code Coverage and Continuous Integration
  8. Where to Go from Here

商品描述(中文翻譯)

主要特點


  • 學習測試驅動的原則,幫助您建立更少錯誤和更好設計的應用程式

  • 在使用 Swift 開發時更加高效,以便更快地進入下一個專案!

  • 將測試驅動開發(TDD)的所有原則融入您的日常編程工作流程中

書籍描述

測試驅動開發(TDD)是一種早期發現軟體錯誤的有效方法。在編寫程式碼之前撰寫測試可以改善應用程式的結構和可維護性。結合 Swift 3 的改進語法,再也沒有寫糟糕程式碼的藉口了。

本書將幫助您了解 TDD 的過程以及它如何影響您使用 Swift 編寫的應用程式。通過一個實際的、真實世界的範例應用程式,您將開始看到如何在上下文中實施 TDD。您將首先瞭解 TDD 工作流程的概述,然後深入探討單元測試的概念和程式碼循環。您還將計劃和結構化您的測試驅動 iOS 應用程式,並編寫測試來驅動視圖控制器和輔助類的開發。接下來,您將學習如何為網絡程式碼編寫測試,以及什麼是 CI 以及如何使用 Xcode Server 設置它。

最後,本書將通過討論集成測試、行為驅動開發(BDD)、開源測試框架和 Xcode 8 中引入的 UI 測試,引導您成為測試專家的下一步。

您將學到什麼


  • 在 Swift 應用程式開發中實施 TDD

  • 使用 TDD 方法在編寫程式碼之前找到錯誤

  • 使用 TDD 構建模型、視圖控制器和視圖

  • 使用異步測試和存根測試網絡程式碼

  • 編寫易於閱讀和維護的程式碼

  • 開發功能測試以確保應用程式按計劃運作

  • 使用持續集成使測試和部署更加容易

關於作者

Dr. Dominik Hauser 在德國海德堡大學獲得物理學博士學位。在擔任大學教授期間,他在業餘時間開始進行 iOS 開發。他的第一個物理學應用程式在全球取得了驚人的成功。從那時起,他全職從事 iOS 開發,並擁有多個成功的應用程式。他從一開始就是一位 Swift 開發者,並在 iOS 開發方面運營一個博客,www.swiftandpainless.com。

目錄


  1. 您的第一個單元測試

  2. 計劃和結構化您的測試驅動 iOS 應用程式

  3. 測試驅動的數據模型

  4. 測試驅動的視圖控制器

  5. 測試網絡程式碼

  6. 將所有內容結合在一起

  7. 程式碼覆蓋率和持續集成

  8. 下一步該往哪裡走