On the Web: Testing Javascript with Apache Maven

March 18, 2010 By Tim O'Brien Comments Off

A few years ago Javascript was still something of a curiosity for most web developers.   Fast forward to 2010, and most web applications are using liberal amounts of Javascript to take advantage of AJAX interactions and REST services.   Once a curiosity, Javascript is now a primary artifact in a web project.

Javascript deserves the same build support as other source code.  It needs to be tested as a part of the build and integrated into the overall build lifecycle.  Stéphane Épardaud writes a great how-to about using Rhino, the Maven Jetty plugin, and a Maven plugin called Testlol to run AJAX-enabled JavaScript unit tests in MavenCheck out his blog post, it is a testament to the flexibility of Maven that it can be adapted to support such a wide range of languages and technologies: from Flex to Java to Javascript, all within the same unified project structure and lifecycle.

(more…)