[Httpunit-develop] New User ... with some problem
Brought to you by:
russgold
From: Paolo Q. <pao...@in...> - 2002-03-26 11:09:12
|
Hi to all, I'm a new Italian user of HttpUnit .. and a new XP (X Programming) fan I have installed the httpunit but I have a problem I installed the above jars: junit.jar (version 3.7) httpunit.jar (latest version) Tidy.jar (included with httpunit distribution) jaxp-api.jar (from Sun: java_xml_pack-spring02-dev.zip) If I compile the Example.java (httpunit\examples) code I obtain: no error. If I execute Example I obtain: D:\Java\httpunit\examples>java Example HttpWebResponse [url=http://meterware.com; headers={CONTENT-TYPE=[Ljava.lang.Str ing;@220892, CONTENT-LENGTH=[Ljava.lang.String;@60bc08, CONNECTION=[Ljava.lang.S tring;@58b649, TRANSFER-ENCODING=[Ljava.lang.String;@27734f, SERVER=[Ljava.lang. String;@37c71, DATE=[Ljava.lang.String;@5f073d, KEEP-ALIVE=[Ljava.lang.String;@5 46e25}] Exception: java.lang.ArrayIndexOutOfBoundsException OK I think that is quite good ... but with an exception. If I compile: D:\Java\httpunit\examples>javac ExampleTest.java -> No errors If I execute: java ExampleTest: D:\Java\httpunit\examples>javac ExampleTest.java D:\Java\httpunit\examples>java ExampleTest .F.E.E Time: 6,65 There were 2 errors: 1) testBadLogin(ExampleTest) java.lang.ArrayIndexOutOfBoundsException at ExampleTest.testBadLogin(ExampleTest.java:57) at ExampleTest.main(ExampleTest.java:19) 2) testGoodLogin(ExampleTest) java.lang.ArrayIndexOutOfBoundsException at ExampleTest.testGoodLogin(ExampleTest.java:73) at ExampleTest.main(ExampleTest.java:19) There was 1 failure: 1) testWelcomePage(ExampleTest)junit.framework.AssertionFailedError: expected:<1 > but was:<0> at ExampleTest.testWelcomePage(ExampleTest.java:42) at ExampleTest.main(ExampleTest.java:19) FAILURES!!! Tests run: 3, Failures: 1, Errors: 2 Ok There is some problem!! Now If I Use the Junit User Interface: D:\Java\httpunit\examples>java junit.swingui.TestRunner java.lang.IllegalAccessError: try to access field org.w3c.tidy.ParserImpl._parseHead from class org.w3c.tidy.ParserImpl$ParseHTML at org.w3c.tidy.ParserImpl$ParseHTML.parse (ParserImpl.java) at org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java) at org.w3c.tidy.Tidy.parse(Tidy.java) at org.w3c.tidy.Tidy.parseDOM(Tidy.java) at com.meterware.httpunit.ReceivedPage.getDOM(ReceivedPage.java:113) at com.meterware.httpunit.ReceivedPage.<init>(ReceivedPage.java:47) at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:833) at com.meterware.httpunit.WebResponse.addFrameTags(WebResponse.java:821) at com.meterware.httpunit.WebResponse.getFrames(WebResponse.java:811) at com.meterware.httpunit.WebResponse.getFrameNames(WebResponse.java:257) at com.meterware.httpunit.WebClient.updateFrames(WebClient.java:396) at com.meterware.httpunit.WebClient.updateClient(WebClient.java:313) at com.meterware.httpunit.WebClient.getResponse(WebClient.java:72) at com.meterware.httpunit.WebClient.updateClient(WebClient.java:311) at com.meterware.httpunit.WebClient.getResponse(WebClient.java:72) at ExampleTest.testWelcomePage(ExampleTest.java:40) I Think that there is some problem with the calsses (the jars??) Could you please give me some piece of advice ... I WANT use this Wonderful package!! THANKS to all in Advance!! Paolo Quaglia |