httpunit-1.6 package is not work

N

nova1427

I download the package from this site
http://www.httpunit.org/
http://voxel.dl.sourceforge.net/sourceforge/httpunit/httpunit-1.6.zip

I try to run one of examples folder "ProxySample.java"
and i do some changing in setProxyServer with user

import com.meterware.httpunit.WebConversation;
import junit.framework.TestCase;
import junit.framework.TestSuite;

public class ProxySample extends TestCase {
public static void main(String args[]) {
junit.textui.TestRunner.run( suite() );
}
public static TestSuite suite() {
return new TestSuite( ProxySample.class );
}
public ProxySample( String name ) {
super( name );
}
public void testProxyAccess() throws Exception {
WebConversation wc = new WebConversation();
wc.setProxyServer( "stuproxy.kfupm.edu.sa", 80, "UserAccount",
"password" );
wc.getResponse( "http://www.meterware.com" );
}
}

it give me this result

<<<
..E
Time: 0.937
There was 1 error:
1) testProxyAccess(ProxySample)java.lang.RuntimeException: No HTML
parser found.
Make sure that either nekoHTML.jar or Tidy.jar is in the in classpath
at
com.meterware.httpunit.parsing.HTMLParserFactory.getHTMLParser(HTMLPa
rserFactory.java:92)
at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:255)
at
com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:1
126)
at
com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:6
88)
at
com.meterware.httpunit.javascript.JavaScript.load(JavaScript.java:89)

at
com.meterware.httpunit.javascript.JavaScriptEngineFactory.load(JavaSc
riptEngineFactory.java:58)
at
com.meterware.httpunit.RequestContext.runScripts(RequestContext.java:
44)
at
com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:122)
at
com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:102)
at
com.meterware.httpunit.WebClient.getResponse(WebClient.java:87)
at ProxySample.testProxyAccess(ProxySample.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at ProxySample.main(ProxySample.java:36)

FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
please, can you help me

thanks
 
O

Owen Jacobson

I download the package from this site
http://www.httpunit.org/
http://voxel.dl.sourceforge.net/sourceforge/httpunit/httpunit-1.6.zip

I try to run one of examples folder "ProxySample.java"
and i do some changing in setProxyServer with user
....snip...

it give me this result

<<<
.E
Time: 0.937
There was 1 error:
1) testProxyAccess(ProxySample)java.lang.RuntimeException: No HTML
parser found.
Make sure that either nekoHTML.jar or Tidy.jar is in the in classpath
....snip...


please, can you help me

READ. THE. ERROR. It tells you exactly what's wrong and how to fix it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,348
Latest member
RoscoeNevi

Latest Threads

Top