Instant Testing with QUnit [Instant]

This title is available as an eBook only
Instant Testing with QUnit [Instant]
eBook: $19.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print & eBook also available on:
Learn in an Instant - Short, Fast, Focused
Table of Contents
Sample Chapters
  • 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

Book Details

Language : English
eBook : 64 pages
Release Date : August 2013
ISBN : 1783282177
ISBN 13 : 9781783282173
Author(s) : Dmitry Sheiko
Topics and Technologies : All Books, Application Development, Instant, Open Source

Table of Contents

Instant Testing with QUnit
  • 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 QUnit in the console (Advanced)
    • Cross-browser-distributed testing (Advanced)
    • Building a web project (Advanced)
    • QUnit and CI – setting up Jenkins (Advanced)

Dmitry Sheiko

Dmitry Sheiko is a web developer, blogger, and open source contributor living and working in the city of Frankfurt am Main, Germany. He started learning about computer programming in the late 80s. Since the late 90s, he has been developing web applications and tools. He currently works as a senior web developer for a leading game development company called Crytek GmbH. This is Dmitry’s first book, but he has been blogging for a decade. You can find his thoughts and solutions on subjects such as code quality, software architecture, JavaScript, NodeJs, TypeScript, HTML5 API, CSS3, and PHP at

Dmitry’s very first open source contribution was BCWB – an XSLT-based CMS in 2004. Since then, he has been contributing quite consistently. His latest works are available at

For readers who use QUnit the book does have advanced sections on writing your own custom assertion plugins and running your QUnit tests from the command line. - Pedram Badakhchani

I am new to QUnit but coming from a background of Java and JUnit, I found this book quite easy to follow.What was most useful to me was the examples for running the tests from the command line and automating the tests in a continuous integration environment using Jenkins.

- Geoff Froud

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 1 submitted: last submission 21 Jan 2014

Errata type: Code |Page number: 14

assert.eq ual( utils.trim(" .. "), "..", "trims spaces" );
should be:
assert.equal( utils.trim(" .. "), "..", "trims spaces" );

Sorry, there are currently no downloads available for this title.

Frequently bought together

Instant Testing with QUnit [Instant] +    Business Process Driven SOA using BPMN and BPEL =
50% Off
the second eBook
Price for both: $35.20

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

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

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.


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 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.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software