[Webtest] java.io.IOException

webtest@lists.canoo.com webtest@lists.canoo.com
Tue, 4 May 2004 09:37:47 +0200


Hi François,
The java.IOException come from an http error, you should verify the config step
(port, host, protocol and basepath). You shoud verify that you make an invoke
before the clikbutton and verify the URL of this invoke. For a good
verification, I advice to you to test the invoke url with your webbrowser.
(URL = protocole://host:port/basepath/url)

Good luke, Lezoul



Selon Francois LETELLIER <francois.letellier@objectweb.org>:
> At 10:40 02/05/2004, Marc Guillemot wrote:
> 
> >Hi,
> >
> >what is the action of the form? May the error caused one time again due to 
> >the file protocol that is currently not supported by httpunit?
> 
> No. it's a submit button in a regulat HTTP page.
> The exact same works with another web site.
> May this error originate from a difference in the HTTP options from one 
> site to another ?
> 
> 
> 
> >Marc.
> >
> >
> >Francois LETELLIER wrote:
> >>Hi,
> >>I get the following stacktrace when trying a basic script with two 
> >><setinputfield> and one <clickbutton>.
> >>No doc about it :-( ...
> >>Hint anybody :) ? Thanks.
> >>[testSpec] ERROR (Step.java:333) - Cannot handle unexpected exception in 
> >>step ClickButton at /home/flet/build.xml:35:  with (label="Envoyer", 
> >>stepId="<unknown>", stepType="clickbutton")
> >>  [testSpec] java.io.IOException
> >>  [testSpec]     at 
> >>
>
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:593)
> 
> >>
> >>  [testSpec]     at 
> >> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
> >>  [testSpec]     at 
> >>
>
com.meterware.httpunit.HttpWebResponse.readResponseHeader(HttpWebResponse.java:159)
> 
> >>
> >>  [testSpec]     at 
> >>
> com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java:197)
> >>  [testSpec]     at 
> >> com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:53)
> >>  [testSpec]     at 
> >>
> com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:61)
> >>  [testSpec]     at 
> >> com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
> >>  [testSpec]     at 
> >> com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:125)
> >>  [testSpec]     at 
> >> com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
> >>  [testSpec]     at 
> >> com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:141)
> >>  [testSpec]     at 
> >> com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:127)
> >>  [testSpec]     at 
> >> com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
> >>  [testSpec]     at 
> >> com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:107)
> >>  [testSpec]     at 
> >>
> com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:245)
> 
> >>
> >>  [testSpec]     at 
> >>
> com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:224)
> 
> >>
> >>  [testSpec]     at 
> >> com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:75)
> >>  [testSpec]     at 
> >> com.meterware.httpunit.SubmitButton.doButtonAction(SubmitButton.java:47)
> >>  [testSpec]     at com.meterware.httpunit.Button.click(Button.java:68)
> >>  [testSpec]     at 
> >> com.canoo.webtest.steps.request.ClickButton$1.call(ClickButton.java:120)
> >>  [testSpec]     at 
> >> com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:106)
> >>  [testSpec]     at 
> >>
> com.canoo.webtest.steps.request.ClickButton.gotoTarget(ClickButton.java:110)
> >>  [testSpec]     at 
> >>
> com.canoo.webtest.steps.request.ClickButton.doExecute(ClickButton.java:103)
> >>  [testSpec]     at com.canoo.webtest.steps.Step.execute(Step.java:99)
> >>  [testSpec]     at 
> >> com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
> >>  [testSpec]     at 
> >>
> com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:68)
> 
> >>
> >>  [testSpec]     at 
> >> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
> >>  [testSpec]     at org.apache.tools.ant.Task.perform(Task.java:364)
> >>  [testSpec]     at org.apache.tools.ant.Target.execute(Target.java:301)
> >>  [testSpec]     at
> org.apache.tools.ant.Target.performTasks(Target.java:328)
> >>  [testSpec]     at 
> >> org.apache.tools.ant.Project.executeTarget(Project.java:1215)
> >>  [testSpec]     at 
> >> org.apache.tools.ant.Project.executeTargets(Project.java:1063)
> >>  [testSpec]     at org.apache.tools.ant.Main.runBuild(Main.java:632)
> >>  [testSpec]     at org.apache.tools.ant.Main.startAnt(Main.java:183)
> >>  [testSpec]     at 
> >> org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
> >>  [testSpec]     at 
> >> org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
> >>  [testSpec] Caused by: java.net.UnknownHostException: my
> >>  [testSpec]     at 
> >> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
> >>  [testSpec]     at java.net.Socket.connect(Socket.java:452)
> >>  [testSpec]     at java.net.Socket.connect(Socket.java:402)
> >>  [testSpec]     at
> sun.net.NetworkClient.doConnect(NetworkClient.java:139)
> >>  [testSpec]     at 
> >> sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
> >>  [testSpec]     at 
> >> sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
> >>  [testSpec]     at
> sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
> >>  [testSpec]     at
> sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
> >>  [testSpec]     at sun.net.www.http.HttpClient.New(HttpClient.java:339)
> >>  [testSpec]     at sun.net.www.http.HttpClient.New(HttpClient.java:320)
> >>  [testSpec]     at sun.net.www.http.HttpClient.New(HttpClient.java:315)
> >>  [testSpec]     at 
> >>
>
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:512)
> 
> >>
> >>  [testSpec]     at 
> >>
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:489)
> 
> >>
> >>  [testSpec]     at 
> >>
>
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:617)
> 
> >>
> >>  [testSpec]     at 
> >>
>
sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(HttpURLConnection.java:1490)
> 
> >>
> >>  [testSpec]     at 
> >>
> com.meterware.httpunit.HttpWebResponse.loadHeaders(HttpWebResponse.java:217)
> >>  [testSpec]     at 
> >>
> com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java:195)
> >>  [testSpec]     ... 31 more
> >>
> >>François LETELLIER
> >>INRIA Rhône-Alpes - ObjectWeb Consortium Executive Committee
> >>email: francois.letellier at objectweb.org - phone: +33 (0)6 84 64 00 24
> >>http://www.objectweb.org - ObjectWeb middleware : provide your 
> >>applications with the kind of freedom they deserve !
> >
> >
> >_______________________________________________
> >WebTest mailing list
> >WebTest@lists.canoo.com
> >http://lists.canoo.com/mailman/listinfo/webtest
> >
> 
> François LETELLIER
> INRIA Rhône-Alpes - ObjectWeb Consortium Executive Committee
> email: francois.letellier at objectweb.org - phone: +33 (0)6 84 64 00 24
> http://www.objectweb.org - ObjectWeb middleware : provide your applications 
> with the kind of freedom they deserve !
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> 


--