Hi All,
 
I'm novice to jwebunit and trying to follow the directions provided in this web site jwebunit.sourceforge.net/
 
I have copied all necesary lib files and configured the eclipse IDE to run the test. I'm getting runtime exception at begining of program at beginAt("/) method.
 
Code I'm dealing with is :
 
import net.sourceforge.jwebunit.*;
public class TestSearch extends WebTestCase {
 
 public TestSearch(String name){
  super(name);
 
public void setUp()throws Exception {
  System.out.println("in setUp()");
  getTestContext().setBaseUrl("http://www.cnet.com");
}
public void testFirstPage() {
  System.out.println("in testFirstPage()");
// beginAt("/2001-1_7-0.html");
  beginAt("/");
}
}
 
As soon as I run this, getting following runtimeexception. Has some one expericed this before? Your comments would be highly appreciated.
 
java.lang.RuntimeException: java.io.EOFException
 at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:200)
 at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:190)
 at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:130)
 at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
 at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68)
 at com.meterware.httpunit.WebResponse.defineRawInputStream(WebResponse.java:739)
 at com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:57)
 at com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:61)
 at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
 at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:125)
 at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
 at com.meterware.httpunit.WebClient.getResponse(WebClient.java:112)
 at net.sourceforge.jwebunit.HttpUnitDialog.<init>(HttpUnitDialog.java:48)
 at net.sourceforge.jwebunit.WebTester.beginAt(WebTester.java:55)
 at net.sourceforge.jwebunit.WebTestCase.beginAt(WebTestCase.java:46)
 at com.TestSearch.testDownloadLink(TestSearch.java:63)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at junit.framework.TestCase.runTest(TestCase.java:154)
 at junit.framework.TestCase.runBare(TestCase.java:127)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
 at net.sourceforge.jwebunit.HttpUnitDialog.<init>(HttpUnitDialog.java:50)
 at net.sourceforge.jwebunit.WebTester.beginAt(WebTester.java:55)
 at net.sourceforge.jwebunit.WebTestCase.beginAt(WebTestCase.java:46)
 at com.TestSearch.testDownloadLink(TestSearch.java:63)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at junit.framework.TestCase.runTest(TestCase.java:154)
 at junit.framework.TestCase.runBare(TestCase.java:127)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
 
 

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply via email to