IOS Unit Testing by Example: Xctest Tips and Techniques Using Swift (Paperback)
暫譯: iOS 單元測試實例:使用 Swift 的 XCTest 技巧與技術 (平裝本)
Reid, Jon
- 出版商: Pragmatic Bookshelf
- 出版日期: 2020-07-28
- 售價: $1,940
- 貴賓價: 9.5 折 $1,843
- 語言: 英文
- 頁數: 300
- 裝訂: Quality Paper - also called trade paper
- ISBN: 1680506811
- ISBN-13: 9781680506815
-
相關分類:
Apple Developer、軟體測試、Unit Test 單元測試
立即出貨 (庫存 < 3)
買這商品的人也買了...
-
$480$379 -
$680$537 -
$390$257 -
$301騰訊 iOS 測試實踐
-
$580$458 -
$354$336 -
$480$379 -
$474$450 -
$1,140$1,083 -
$880$695 -
$602MINECRAFT 編程:使用 Python 語言玩轉我的世界 (Learn to Program with Minecraft: Transform Your World with the Power of Python)
-
$1,100$1,045 -
$450$405 -
$474$450 -
$960SwiftUI Cookbook: Discover solutions and best practices to tackle the most common problems while building SwiftUI apps
-
$520$260 -
$1,640$1,558 -
$720$360 -
$720$360 -
$539$512 -
$580$458 -
$774$735
相關主題
商品描述
Fearlessly change the design of your iOS code with solid unit tests. Use Xcode's built-in test framework XCTest and Swift to get rapid feedback on all your code - including legacy code. Learn the tricks and techniques of testing all iOS code, especially view controllers (UIViewControllers), which are critical to iOS apps. Learn to isolate and replace dependencies in legacy code written without tests. Practice safe refactoring that makes these tests possible, and watch all your changes get verified quickly and automatically. Make even the boldest code changes with complete confidence.
Manual code and UI testing get slower the deeper your navigation hierarchy goes. It can take several taps just to reach a particular screen, never mind the actual workflow tests. Automatic unit testing offers such rapid feedback that it can change the rules of development. Bring testing to iOS development, even for legacy code. Use XCTest to write unit tests in Swift for all your code.
iOS developers typically reserve unit tests for their model classes alone. But that approach skips most of the code common to iOS apps, especially with UIViewControllers. Learn how to unit test these view controllers to expand your unit testing possibilities. Since good unit tests form the bedrock for safe refactoring, you're empowered to make bold changes. Learn how to avoid the most common mistakes Swift programmers make with the XCTest framework. Use code coverage to find holes in your test suites. Learn how to identify hard dependencies.
Reshape the design of your code quickly, with less risk and less fear.
商品描述(中文翻譯)
無畏地改變您的 iOS 代碼設計,並透過穩固的單元測試來實現。使用 Xcode 內建的測試框架 XCTest 和 Swift,快速獲得所有代碼的反饋,包括舊有代碼。學習測試所有 iOS 代碼的技巧和技術,特別是對於對 iOS 應用至關重要的視圖控制器 (UIViewControllers)。學會如何隔離和替換未經測試的舊代碼中的依賴項。練習安全的重構,使這些測試成為可能,並快速自動驗證您所有的更改。即使是最大膽的代碼更改也能充滿信心地進行。
手動代碼和 UI 測試隨著導航層級的加深而變得更慢。僅僅到達特定螢幕可能需要多次點擊,更不用說實際的工作流程測試了。自動單元測試提供如此快速的反饋,以至於可以改變開發的規則。將測試引入 iOS 開發,即使是對於舊代碼。使用 XCTest 在 Swift 中為您的所有代碼編寫單元測試。
iOS 開發者通常僅將單元測試保留給他們的模型類別。但這種方法跳過了大多數 iOS 應用中常見的代碼,特別是 UIViewControllers。學習如何對這些視圖控制器進行單元測試,以擴展您的單元測試可能性。由於良好的單元測試是安全重構的基石,您將能夠進行大膽的更改。學習如何避免 Swift 程式設計師在使用 XCTest 框架時最常犯的錯誤。使用代碼覆蓋率來找出測試套件中的漏洞。學習如何識別硬依賴項。
快速重塑您的代碼設計,降低風險,減少恐懼。
作者簡介
Jon Reid is a leading expert in unit testing and Test-Driven Development for iOS development. He has been practicing TDD on Apple platforms since 2001. His blog, https: //qualitycoding.org focuses on iOS unit testing practices.
作者簡介(中文翻譯)
Jon Reid 是 iOS 開發領域單元測試和測試驅動開發(Test-Driven Development, TDD)的領先專家。他自 2001 年以來一直在 Apple 平台上實踐 TDD。他的部落格 https://qualitycoding.org 專注於 iOS 單元測試的實踐。