Instant Testing with QUnit
暫譯: 即時測試 QUnit
Dmitry Sheiko
- 出版商: Packt Publishing
- 出版日期: 2013-08-10
- 售價: $1,300
- 貴賓價: 9.5 折 $1,235
- 語言: 英文
- 頁數: 64
- 裝訂: Paperback
- ISBN: 1783282177
- ISBN-13: 9781783282173
海外代購書籍(需單獨結帳)
商品描述
Employ QUnit to increase your efficiency when testing JavaScript code
Overview
- Learn something new in an Instant! A short, fast, focused guide delivering immediate results
- Learn about cross-browser testing with QUnit
- Learn how to use popular QUnit plugins and develop your own plugins
- Hands-on examples on all the essential QUnit methods
In Detail
Automated testing is a significant part of agile development. QUnit is widely used in the jQuery Project for testing jQuery, jQuery UI, and jQuery Mobile; it can also be used to test any generic JavaScript code. As for JavaScript testing in particular, QUnit is a good choice for a framework as users can grasp the basics in a short span of time. The framework is a leading tool for unit and acceptance testing and can be used in conjunction with a wide range of third-party software. Instant Testing with QUnit covers all the essentials of QUnit and explains how you can use the framework in combination with other tools to improve your development process.
"Instant Testing with QUnit" is a hands-on guide that will help you achieve beneficial automated testing with QUnit and its plugins. This book also shows you how to engage QUnit for automated cross-browser testing and utilize it in conjunction with development automation and Continuous Integration tools.
"Instant Testing with QUnit" provides a comprehensive look into QUnit essentials and shows how you can benefit from the framework in conjunction with other tools. You will start by considering QUnit fundamentals before learning how QUnit can be used for functional testing and cross-browser automated testing with the Bunyip tool. You will also walk through a tutorial on popular QUnit plugins and then write one of your own. By the end of Instant Testing with QUnit, you will have learned how to run QUnit in the command line and how to set up the Jenkins CI server and make it perform QUnit tests.
What you will learn from this book
- Set up and start working with QUnit
- Use QUnit assertion methods, exception handlers, test grouping functions, and shared setup
- Test user actions and synchronous calls
- Run QUnit tests in a console
- Run automated cross-browser tests with QUnit and Bunyip
- Include QUnit tests in Apache Ant build script
- Set up Jenkins and run QUnit tests
Approach
Filled with practical, step-by-step instructions and clear explanations for the most important and useful tasks. A concise guide full of step-by-step recipes to teach you how to perform automated testing using QUnit.
Who this book is written for
"Instant Testing with QUnit" is for anyone working with JavaScript who is looking for a powerful and easy-to-use testing framework. The reader does not need to know any particular framework, only the basic principles of JavaScript and HTML.
商品描述(中文翻譯)
使用 QUnit 提高測試 JavaScript 代碼的效率
概述
- 瞬間學習新知!一本短小、快速、專注的指南,提供即時結果
- 了解如何使用 QUnit 進行跨瀏覽器測試
- 學習如何使用流行的 QUnit 插件並開發自己的插件
- 針對所有基本 QUnit 方法的實作範例
詳細內容
自動化測試是敏捷開發的重要組成部分。QUnit 在 jQuery 專案中被廣泛用於測試 jQuery、jQuery UI 和 jQuery Mobile;它也可以用來測試任何通用的 JavaScript 代碼。特別是在 JavaScript 測試方面,QUnit 是一個不錯的框架,因為使用者可以在短時間內掌握基本概念。這個框架是單元測試和驗收測試的領先工具,並且可以與各種第三方軟體結合使用。《使用 QUnit 進行瞬間測試》涵蓋了 QUnit 的所有基本要素,並解釋了如何將該框架與其他工具結合使用,以改善您的開發流程。
《使用 QUnit 進行瞬間測試》是一本實作指南,將幫助您利用 QUnit 及其插件實現有效的自動化測試。本書還展示了如何使用 QUnit 進行自動化的跨瀏覽器測試,並將其與開發自動化和持續整合工具結合使用。
《使用 QUnit 進行瞬間測試》提供了對 QUnit 基本要素的全面了解,並展示了如何將該框架與其他工具結合使用以獲益。您將首先考慮 QUnit 的基本概念,然後學習如何使用 QUnit 進行功能測試和使用 Bunyip 工具進行跨瀏覽器自動化測試。您還將通過一個流行的 QUnit 插件的教程,然後編寫自己的插件。在《使用 QUnit 進行瞬間測試》的結尾,您將學會如何在命令行中運行 QUnit,以及如何設置 Jenkins CI 伺服器並使其執行 QUnit 測試。
您將從本書中學到的內容
- 設置並開始使用 QUnit
- 使用 QUnit 斷言方法、異常處理器、測試分組函數和共享設置
- 測試用戶操作和同步調用
- 在控制台中運行 QUnit 測試
- 使用 QUnit 和 Bunyip 進行自動化跨瀏覽器測試
- 在 Apache Ant 構建腳本中包含 QUnit 測試
- 設置 Jenkins 並運行 QUnit 測試
方法
本書充滿了實用的逐步指導和清晰的解釋,涵蓋最重要和有用的任務。一本簡明的指南,提供逐步的食譜,教您如何使用 QUnit 進行自動化測試。
本書的讀者對象
《使用 QUnit 進行瞬間測試》適合任何使用 JavaScript 的人,尋找一個強大且易於使用的測試框架。讀者不需要了解任何特定框架,只需掌握 JavaScript 和 HTML 的基本原則。