“I suppose at least in a generic way you know what is unit testing, but to sum it up in a few words, according to Wikipedia:
Unit testing is a method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine if they are fit for use.
By starting an application development, when it has relatively few lines of code all “fits” perfectly, but later when you want to add, modify, or delete certain functionality, this can become a big problem since when changing anything probably you will be breaking a few by the way.
Thanks to unit testing you can modify any module in your code, launch the tests, check failures, correct, and ready. Everything will still work in a clean, quick, and tidy way.
Don’t be scared by the fact that the application’s backend is programmed in Java: you won’t see anything of Java throughout the entire book however if you want to run the application in your computer, you’ll need to install Apache Tomcat.
The Jasmine test cases give more importance to the application business value over the technical details. Also are written in natural language so they can be understood by people without technical background.
Finally you’ll use together jQuery and Jasmine thanks to an available plugin that allows an easy integration between these 2 frameworks.
Chapter 3 – YUI Test: In this chapter you’ll learn to use one of the most popular unit testing frameworks: YUI Test.
In addition to this you’ll see how to automate your unit testing integrating YUI Test with Selenium Driver.
QUnit is very popular and has a simple syntax that allows you to run the tests from a browser.
Like in previous chapters, you’ll see how to install and configure QUnit, run your firsts tests, and once you’ve got a solid basis create the necessary tests for the weather application.
Chapter 5 – JsTestDriver: JsTestDriver (JSTD) is one of the most powerful frameworks for unit testing because in addition to the framework, it incorporates a test runner that can run other unit testing frameworks. All contained in a JAR file that includes everything you need to start to create your tests.
Finally you’ll see how to integrate JSTD with the Eclipse IDE thanks to the JSTD Eclipse plugin.
It’s a short book compared with other books published by PacktPub but the content quality hasn’t been reduced. In any case I’ve missed information about other frameworks based on node.js that are becoming very popular like Mocha or CasperJS.
When you have finished reading it you will have a strong foundation to begin creating unit tests for your applications, which will improve your code and will optimize the time that you spend to modify existing applications.”
The book on PacktPub: