Free Sample
+ Collection

Instant Testing with QUnit

Starting
Dmitry Sheiko

Employ QUnit to increase your efficiency when testing JavaScript code
$19.99
RRP $19.99
eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783282173
Paperback64 pages

About This Book

  • 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

Who This Book Is 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.

Table of Contents

Chapter 1: Instant Testing with QUnit
Setting up QUnit (Simple)
Testing assertions (Simple)
Writing a custom assertion plugin (Advanced)
Testing exceptions (Medium)
Testing asynchronous calls (Medium)
Organizing test cases (Simple)
Using a shared setup (Medium)
Testing user actions (Medium)
Running Qnit in the console (Advanced)
Cross-browser-distributed testing (Advanced)
Building a web project (Advanced)
QUnit and CI – setting up Jenkins (Advanced)

What You Will Learn

  • 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

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.

Authors

Read More