[Webtest] java.io.IOException

Francois LETELLIER webtest@lists.canoo.com
Wed, 05 May 2004 12:16:07 +0200


At 09:37 04/05/2004, lezoul@free.fr wrote:

>Hi Fran=E7ois,
>The java.IOException come from an http error, you should verify the config=
=20
>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 =3D protocole://host:port/basepath/url)

Thanks for your answer.
An invoke is performed and successful, before the clickbutton.
Actually the button is found (when I change the button 'label' tag with=20
'foobar', an other error occurs -- not the exception reported here).
I'm very surprised that the "unhandled exception" I get comes from a Sun=20
'java.io' package.



>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=20
> 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=3D"Envoyer",
> > >>stepId=3D"<unknown>", stepType=3D"clickbutton")
> > >>  [testSpec] java.io.IOException
> > >>  [testSpec]     at
> > >>
> >
>sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnectio=
n.java:593)
> >
> > >>
> > >>  [testSpec]     at
> > >>=
 java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
> > >>  [testSpec]     at
> > >>
> >
>com.meterware.httpunit.HttpWebResponse.readResponseHeader(HttpWebResponse.j=
ava:159)
> >
> > >>
> > >>  [testSpec]     at
> > >>
> >=20
>=
 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
> > >>
> >=20
>=
 com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java=
:245)
> >
> > >>
> > >>  [testSpec]     at
> > >>
> >=20
>=
 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
> > >>
> >=20
>=
 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
> > >>
> >=20
>=
 com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.j=
ava: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
> > >>
> >=20
>=
 sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:=
489)
> >
> > >>
> > >>  [testSpec]     at
> > >>
> >
>sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnectio=
n.java:617)
> >
> > >>
> > >>  [testSpec]     at
> > >>
> >
>sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(HttpURLConnec=
tion.java:1490)
> >
> > >>
> > >>  [testSpec]     at
> > >>
> >=20
>=
 com.meterware.httpunit.HttpWebResponse.loadHeaders(HttpWebResponse.java:217=
)
> > >>  [testSpec]     at
> > >>
> >=20
>=
 com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java:195=
)
> > >>  [testSpec]     ... 31 more
> > >>
> > >>Fran=E7ois LETELLIER
> > >>INRIA Rh=F4ne-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=E7ois LETELLIER
> > INRIA Rh=F4ne-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=20
> applications
> > with the kind of freedom they deserve !
> >
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
> >
>
>
>--
>_______________________________________________
>WebTest mailing list
>WebTest@lists.canoo.com
>http://lists.canoo.com/mailman/listinfo/webtest

Fran=E7ois LETELLIER
INRIA Rh=F4ne-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=
=20
with the kind of freedom they deserve !