AngularJS Testing Cookbook
Simon Bailey
- 出版商: Packt Publishing
- 出版日期: 2015-04-04
- 售價: $1,340
- 貴賓價: 9.5 折 $1,273
- 語言: 英文
- 頁數: 193
- 裝訂: Paperback
- ISBN: 1783983744
- ISBN-13: 9781783983742
-
相關分類:
Angular
海外代購書籍(需單獨結帳)
相關主題
商品描述
Eliminate volatile code by taking control and understanding how to test AngularJS applications
About This Book
- Learn how to build a solid and more reliable AngularJS codebase through test-driven development using clearly defined recipes
- Understand how to set up and configure your development environment for unit and end-to-end testing of AngularJS applications
- Over 50 hands-on recipes to help you build a solid foundation in AngularJS
Who This Book Is For
This book is intended for developers who have an understanding of the basic principles behind both AngularJS and test-driven development. You, as a developer, are interested in eliminating the fear related to either introducing tests to an existing codebase or starting out testing on a fresh AngularJS application. If you're a team leader or part of a QA team with the responsibility of ensuring full test coverage of an application, then this book is ideal for you to comprehend the full testing scope required by your developers. Whether you're new to or are well versed with AngularJS, this book will guarantee a complete understanding of your application code and help reduce the cost of bugs.
What You Will Learn
- Install and configure all required tools and dependencies to begin testing your AngularJS application
- Understand the anatomy of a unit test and integrate core fundamentals to begin testing AngularJS
- Discover navigation and routing using both the AngularJS router and the ui-router library
- Explore how to test controllers
- Analyze test directives and user-based interaction
- Explain the uses of spies and test events
- Test services using mocks and spies
- Animate test cases, both synchronously and asynchronously
In Detail
AngularJS stepped up to offer a comprehensive solution to frontend development with minimal dependencies and a clear set of objectives.
This book follows the AngularJS philosophy and offers guidance on how to approach testing components that make up the AngularJS framework. At the start of the book, you will explore how to configure your system to run unit and end-to-end tests. Following this, you'll become familiar with fundamental principles on testing AngularJS with Jasmine. Then, you'll understand how spies can enable you to test your code with greater coverage and simplicity throughout your application. The final result is an AngularJS application that is tested with integrity, helping facilitate a cleaner and more reliable codebase.
商品描述(中文翻譯)
消除不穩定的程式碼,掌握如何測試 AngularJS 應用程式
關於本書
- 學習如何透過測試驅動開發,使用明確定義的食譜來建立穩固且更可靠的 AngularJS 程式碼庫
- 了解如何設置和配置開發環境,以進行 AngularJS 應用程式的單元測試和端對端測試
- 超過 50 個實作食譜,幫助你在 AngularJS 中建立堅實的基礎
本書適合誰
本書適合對 AngularJS 和測試驅動開發的基本原則有一定了解的開發人員。作為開發者,你希望消除與將測試引入現有程式碼庫或在全新的 AngularJS 應用程式上開始測試相關的恐懼。如果你是團隊領導或 QA 團隊的一部分,負責確保應用程式的完整測試覆蓋,那麼本書將幫助你理解開發人員所需的完整測試範圍。無論你是 AngularJS 的新手還是熟練者,本書都將保證你對應用程式程式碼的全面理解,並幫助降低錯誤的成本。
你將學到什麼
- 安裝和配置所有必需的工具和依賴,以開始測試你的 AngularJS 應用程式
- 了解單元測試的結構,並整合核心基本原則以開始測試 AngularJS
- 探索使用 AngularJS 路由器和 ui-router 庫的導航和路由
- 探索如何測試控制器
- 分析測試指令和基於用戶的互動
- 解釋間諜和測試事件的用途
- 使用模擬和間諜測試服務
- 同步和異步地動畫化測試案例
詳細內容
AngularJS 提供了一個全面的前端開發解決方案,具有最小的依賴性和明確的目標。
本書遵循 AngularJS 的理念,提供有關如何測試構成 AngularJS 框架的組件的指導。在書的開頭,你將探索如何配置系統以運行單元測試和端對端測試。接下來,你將熟悉使用 Jasmine 測試 AngularJS 的基本原則。然後,你將了解間諜如何使你能夠在整個應用程式中以更大的覆蓋率和簡單性測試你的程式碼。最終結果是一個經過完整測試的 AngularJS 應用程式,幫助促進更乾淨和更可靠的程式碼庫。