JavaScript Testing: Completing the BDD Circle in Web

Martin Flower defines legacy code as code without tests. You test your server-side code, but if you are working on a site with a fair amount of non-trivial JavaScript (ajax call, extensive callbacks, etc.) you really should be testing your JavaScript as well. All the untested JavaScript code we are writing today is, in effect, legacy code, but we can address this with JavaScript unit testing!

One of the biggest problems with testing JavaScript is the need for a browser to do it. This makes it hard to integrate your test suite into CI servers, like Jenkins and Anthill Pro. I’ll show you how to get around this with EnvJasmine to allow you to test your front-end code and get it passing within any CI server that understands how to run Maven, Ant or Rake jobs. EnvJasmine is an open source self-contained allows you to run headless JavaScript tests.

Event: Emerging Technologies for the Enterprise
Video Producer: http://chariotsolutions.com/