Hello,
I am trying to setup my first jWebUnit test following exactly the
example on the site:
public class TestApplication extends WebTestCase {
public TestApplication(String name) {
super(name);
setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
TestContext testContext = getTestContext();
testContext.setBaseUrl("http://localhost:8080/ceagrap/app");
}
I am getting the following error (the tester seems to be null)
junit.framework.AssertionFailedError: Exception in constructor:
testLoginPage (java.lang.NullPointerException
at
net.sourceforge.jwebunit.WebTestCase.getTestContext(WebTestCase.java:84)
at com.volgadev.cea.test.TestApplication.<init>(TestApplication.java:14)
If I try the other example:
public void setUp() throws Exception {
setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
getTestContext().setBaseUrl("http://localhost:8080/ceagrap/app");
}
I got another error:
java.lang.NoSuchMethodError:
org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
at
com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClient(HttpWebConnection.java:302)
at
com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:119)
Any advice would be much appreciated!
Thanks,
Pierre-Yves
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users