JWebUnit
Articles
JWebUnit is a web application testing framework written in Java, which essentially tries to provide a simple API to the powerful HtmlUnit framework. I am a committer to the project.
However, this means that ALL script exceptions will be hidden, which is usually not a good thing - you should try and catch script exceptions for your own code. So, you should only use the above code when it is absolutely necessary (I use a mocking approach).
JWebUnit is a web application testing framework written in Java, which essentially tries to provide a simple API to the powerful HtmlUnit framework. I am a committer to the project.
Google Maps
By default, JWebUnit can't handle Google Maps, because the Google Maps Javascript has a syntax error. One solution is to turn off throwing script exceptions:@Override
protected void setUp() throws Exception {
HtmlUnitTestingEngineImpl engine = (HtmlUnitTestingEngineImpl) getTestingEngine();
engine.setThrowExceptionOnScriptError(false);
// continue as normal...
super.setUp();
}
However, this means that ALL script exceptions will be hidden, which is usually not a good thing - you should try and catch script exceptions for your own code. So, you should only use the above code when it is absolutely necessary (I use a mocking approach).