Backbone.js Testing

Ryan Roemer

  • 出版商: Packt Publishing
  • 出版日期: 2013-07-15
  • 售價: $1,810
  • 貴賓價: 9.5$1,720
  • 語言: 英文
  • 頁數: 168
  • 裝訂: Paperback
  • ISBN: 178216524X
  • ISBN-13: 9781782165248
  • 海外代購書籍(需單獨結帳)

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

相關主題

商品描述

If you dread the business of testing JavaScript and Backbone.js web applications, this book is your guardian angel. In easy stages and lots of examples it takes you through the whole testing situation, introducing you to best practice and current techniques.

Overview

  • Create comprehensive test infrastructures
  • Understand and utilize modern frontend testing techniques and libraries
  • Use mocks, spies, and fakes to effortlessly test and observe complex Backbone.js application behavior
  • Automate tests to run from the command line, shell, or practically anywhere

In Detail

Frontend web applications are soaring in popularity and the Backbone.js library is leading this charge with a modular, lightweight approach for organizing JavaScript web applications. At the same time, testing client-side JavaScript and Backbone.js programs remains a difficult and tedious undertaking.

Backbone.js Testing brings sensible practices and current techniques to the challenges of Backbone.js test development. The book introduces fundamental testing concepts, comprehensive test infrastructure design, and practical exercises to easily and systematically test modern JavaScript web applications.

The book progresses from Mocha test suites and Chai assertions to advanced test mocks and stubs with Sinon.JS. The requisite libraries and utilities are introduced with in-depth examples and best practices for integration with your applications. The book guides you through the test planning and implementation processes for your application models, views, routers, and other Backbone.js components.

Backbone.js Testing gives you the tools, examples, and assistance to test your Backbone.js web applications thoroughly, quickly, and with confidence.

What you will learn from this book

  • Install and set up a test infrastructure for Backbone applications
  • Run, examine, and understand Mocha test reports
  • Tour the Chai assertion library API with detailed examples
  • Write test suites and specs with the Mocha test framework
  • Fake application behavior in tests using Sinon.JS mocks, spies, and fake servers

Approach

This book is packed with step-by-step tutorials and instructions in recipe format to help you create test infrastructures and gradually advance your Backbone.js application development and testing skills.

Who this book is written for

If you are a JavaScript developer looking to create and implement test support for your Backbone.js applications, then this book is ideal for you.

商品描述(中文翻譯)

如果你對測試 JavaScript 和 Backbone.js 網頁應用感到畏懼,這本書將是你的守護天使。它以簡單的步驟和大量的範例,帶你了解整個測試過程,介紹最佳實踐和當前技術。

概述
- 建立全面的測試基礎設施
- 理解並利用現代前端測試技術和庫
- 使用 mocks、spies 和 fakes 輕鬆測試和觀察複雜的 Backbone.js 應用行為
- 自動化測試,從命令行、shell 或幾乎任何地方運行

詳細內容
前端網頁應用的受歡迎程度正在飆升,而 Backbone.js 庫以模組化、輕量化的方式引領著這一潮流,組織 JavaScript 網頁應用。同時,測試客戶端的 JavaScript 和 Backbone.js 程式仍然是一項困難且繁瑣的工作。

Backbone.js Testing 將合理的實踐和當前技術帶入 Backbone.js 測試開發的挑戰中。這本書介紹了基本的測試概念、全面的測試基礎設施設計,以及實用的練習,以輕鬆且系統地測試現代 JavaScript 網頁應用。

本書從 Mocha 測試套件和 Chai 斷言開始,逐步進入使用 Sinon.JS 的高級測試 mocks 和 stubs。所需的庫和工具將通過深入的範例和最佳實踐介紹,以便與你的應用整合。本書將指導你進行應用模型、視圖、路由器和其他 Backbone.js 組件的測試規劃和實施過程。

Backbone.js Testing 為你提供了徹底、快速且自信地測試你的 Backbone.js 網頁應用所需的工具、範例和協助。

你將從這本書中學到什麼
- 安裝和設置 Backbone 應用的測試基礎設施
- 運行、檢查和理解 Mocha 測試報告
- 詳細範例導覽 Chai 斷言庫 API
- 使用 Mocha 測試框架編寫測試套件和規範
- 在測試中使用 Sinon.JS 的 mocks、spies 和假伺服器來模擬應用行為

方法
這本書充滿了逐步的教程和食譜格式的指導,幫助你建立測試基礎設施,並逐漸提升你的 Backbone.js 應用開發和測試技能。

本書的讀者對象
如果你是一位 JavaScript 開發者,想要為你的 Backbone.js 應用創建和實施測試支持,那麼這本書非常適合你。

最後瀏覽商品 (1)