Test-Driven iOS Development with Swift 4 - Third Edition
暫譯: 使用 Swift 4 進行測試驅動的 iOS 開發(第三版)

Dr. Dominik Hauser

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

相關主題

商品描述

Key Features

  • A practical guide to writing effective, organized, and clean code that works well
  • Learn test-driven principles to help you build better-designed apps with fewer bugs
  • A comprehensive overview of the techniques available for TDD in Swift

Book Description

Test-driven development (TDD) is a proven way to find software bugs early. Writing tests before you code improves the structure and maintainability of your apps. Using TDD, in combination with Swift 4's improved syntax, means there is no longer any excuse for writing bad code.

This book will help you understand the process of TDD and how to apply it to your apps written in Swift.

Through practical, real-world examples, you'll learn how to implement TDD in context. You will begin with an overview of the TDD workflow and then delve 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 view controllers and helper classes. Next, you'll learn how to write tests for network code and explore how the test-driven approach-in combination with stubs-helps you write network code even before the backend component is finished.

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

What you will learn

  • Implement TDD in Swift application development
  • Find bugs before you enter 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 maintain
  • Develop functional tests to ensure the app works as planned

About the Author

Dr. Dominik Hauser completed his PhD in physics from the University of Heidelberg. 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 has turned himself into a full-time iOS developer, with a number of successful apps to his name. He has been a Swift developer since day one and runs a blog on iOS development.

Table of Contents

  1. Your First Unit Tests
  2. Planning and Structuring Your Test Driven iOS App
  3. A Test Driven Data Model
  4. Test Driven View Controllers
  5. Testing Network Code
  6. Put It All Together
  7. Code Coverage And Continuous Integration
  8. Where To Go From Here

商品描述(中文翻譯)

**主要特點**

- 實用指南,教你如何編寫有效、有組織且乾淨的程式碼,並確保其運行良好
- 學習測試驅動原則,幫助你構建設計更佳且錯誤更少的應用程式
- 提供 Swift 中可用的測試驅動開發(TDD)技術的全面概述

**書籍描述**

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

本書將幫助你理解 TDD 的過程,以及如何將其應用於用 Swift 編寫的應用程式。

透過實際的真實案例,你將學習如何在上下文中實施 TDD。你將從 TDD 工作流程的概述開始,然後深入了解單元測試概念和程式碼循環。

你還將計劃和結構你的測試驅動 iOS 應用程式,並編寫測試以驅動視圖控制器和輔助類的開發。接下來,你將學習如何為網路程式碼編寫測試,並探索測試驅動方法如何結合存根,幫助你在後端組件完成之前編寫網路程式碼。

最後,本書將指導你邁向成為測試專家的下一步,討論整合測試、行為驅動開發(BDD)、開源測試框架和 UI 測試(在 Xcode 9 中引入)。

**你將學到的內容**

- 在 Swift 應用程式開發中實施 TDD
- 使用 TDD 方法在編寫程式碼之前找到錯誤
- 使用 TDD 構建模型、視圖控制器和視圖
- 使用非同步測試和存根測試網路程式碼
- 編寫易於閱讀和維護的程式碼
- 開發功能測試以確保應用程式按計劃運行

**關於作者**

**Dr. Dominik Hauser** 於海德堡大學獲得物理學博士學位。在擔任大學教授期間,他開始在空閒時間進行 iOS 開發。他的第一款物理學應用程式在全球取得了驚人的成功。自那時起,他轉型為全職 iOS 開發者,並擁有多款成功的應用程式。他自第一天起就是 Swift 開發者,並經營一個有關 iOS 開發的部落格。

**目錄**

1. 你的第一個單元測試
2. 計劃和結構你的測試驅動 iOS 應用程式
3. 測試驅動的資料模型
4. 測試驅動的視圖控制器
5. 測試網路程式碼
6. 將所有內容整合在一起
7. 程式碼覆蓋率與持續整合
8. 接下來該往哪裡走