Friday, April 12, 2013

Testable Javascript

This post about the book "Testable JavaScript" from O'Reilly editor which i got as an exchange from their blogger reviewer program.
I cannot start the analysis of the book without saying that is really more about testing and software engineering good rules to get a nice readable, maintainable, efficient, clear, reusable and high quality code.

The language is really a second layer. What you will learn the first chapters is about how you could (SHOULD!) improve your code and the author, , is really clear on showing the reader how you reach the goal with the help of several tools specifically for JavaScript! That's the JavaScript part which i was interested in as i come from the software development engineering world using Java as main language so i wanted to get some tips about what to use in the JavaScript case.

Traversing the client side framework PhantomJS and the server side Jasmine, the author shape the testing world in JavaScript in a good, concise and clear sentences with the code samples as proof of concept.

Then the following chapters are about code coverage and integration that can be done also with Selenium which i use in my current work to test jsps code and i knew that you can also test JavaScript code.
Selenium is great and powerful API client/server testing environment! - I use it even to test the JSP compilation very easily without any deployment setting or embedded jetty! -

Debugging javascript is a chapter on tis own and covered what you probably expect already that you can use add-on in Mozilla or Chrome to debug you JavaScript code.

The last part is about the favorite part of QA people which is the automation and continuous integration testing. Jenkins and Hudson are both mentioned of course! Personally i use Hudson but they are really similar ;-)

Great book for better coding, better life! It really accomplish the goal i was expecting!

Disclaimer: The book was given as part of the blogger review scheme from O'Reilly.