Testing WebWork stuff is just awesome! I've found a way to easily test
any JavaScript action, and if you liked my little irresponsible lame
HOWTO a few posts ago, you'll find this interesting. I'll post the
source code directly, it's easier read than explained.
public void testHelloWithNameParameter() throws Exception { Script script = new Script(); // Create a new Script Action object script.setScript("hello.js"); // Load a script
// Parameters Map that'll hold the name to greet Map params = new HashMap(); params.put("name", new String[] { NAME }); // every parameter needs to be a Sting[] script.setParameters(params);