I am still new to Javascript and Servlets. I have some HTML pages containing javascript code and these pages can call a servlet. I want to develop JUnit-like test for this page to run from Maven.
I googled and found JSUnit to test Javascript and HttpUnit to test Servlets, but how can I test my HTML page by simulating clicks and user actions? Is there a framework to write these tests in a Java/JUnit fashion? Basically, I want to automate these as part of a maven compilation process.
I use a combination of JWebUnit as the driver and easyb for writing specifications.
JWebUnit will drive either HtmlUnit or Selenium. This is both good and bad; good because the behavioral tests can run on a headless server via HtmlUnit, bad because I lose some functionality of HtmlUnit in the process… some tests “go native”. Pretty good JavaScript support, too.