“Efficient JavaScript Unit Testing” presentation in CONFESS 2012

This presentation shows how to make “Efficient JavaScript unit Testing” using JsTestDriver. It was presented by Hazem Saleh in the CONFESS International Conference 2012 that was held in Austria. The slides are attached below.

Review #1 about the JavaScript Unit Testing Book

Attached below the review of Zubin Wadia (the CEO & Co-Founder of CiviGuard, Inc, CEO & Co-Founder of RedRock IT Solutions, and Chief Technology Officer at ImageWork Technologies) about the “JavaScript Unit Testing” book:

JavaScript Unit Testing

JavaScript Unit Testing Book

A Key Book for Complex Javascript Projects
“Javascript Unit Testing does a phenomenal job covering the Javascript Unit Testing landscape. As Javascript becomes faster and faster within the confines of a Browser, it becomes more likely that complex code will be written with it. It is also natural that larger teams will be writing code for these projects across a variety of modules and separations of concern. All these factors increase the need for disciplined Unit Tests to be written, using some of the most prominent tools available today.

Hazem Saleh sets the book up in the first chapter by emphasizing the WHY around JS unit testing, their purpose in a code-base and how they should be written/designed. If you are a seasoned programmer with a solid unit test writing habit, this chapter is less useful, and you can proceed to the next few chapters. The author also introduces the reader to an appropriate sample application that gives us a canvas on which to apply the fundamentals and variety of Unit Test tools and frameworks in subsequent chapters. The example is a classic weather-oriented one, yet complex enough to put the power and need for JS unit testing into perspective.

Chapters 2-5 walk you through some of the most prominent tools for JS unit testing available today: Jasmine, YUI Test, Q Unit and JSTD. Each one has its own quirks and idiosyncrasies that are competently elaborated upon and applied to the Weather Application sample by the Author. Two other aspects I liked about the book were (1) the Author’s care to include configuration instructions and architecture reviews for frameworks that had some pre-preparation required before you could get into them (2) the progression from some of the lighter-weight frameworks (Jasmin) to the most complex and comprehensive (JSTD). JSTD is a natural capstone chapter for the book given that it has the ability to integrate the other frameworks within its Test Run suite.

All in all, an essential book if you are a good JS developer looking to become great at what you do, and perhaps lead a team in writing orderly and well engineered code on what is the heart of the web today!”


The book on PacktPub:

JavaScript Unit Testing book for Hazem Saleh

JavaScript Unit Testing cover

JavaScript Unit Testing

The JavaScript Unit Testing book is a comprehensive practical guide that illustrates in details how to efficiently perform and automate JavaScript testing for web applications using the most popular JavaScript unit testing frameworks.

The book starts by explaining the concept of JavaScript unit testing and by exploring the bits of an interactive Ajax web application. Throughout the book chapters, the JavaScript part of the web application is tested using popular JavaScript unit testing frameworks (Jasmine, YUITest, QUnit, and JsTestDriver). The book illustrates how to generate JavaScript test reports, how to automate running the tests in the build and the continuous integration environments, and how to make all of the mentioned JavaScript unit testing frameworks work together in order to test the web applications in the most efficient way.

After reading this book, you will learn everything you need to know in order to make efficient JavaScript tests for the web applications. You will learn how to generate test and code coverage reports, how to automate running the JavaScript tests, and the bits of the JavaScript testing by following the book practical hands-on detailed examples.

You can order the book from: http://www.amazon.com/dp/1782160620/.