[Webtest] [webtest][JIRA] Created: (WT-574) Error running demo tests

Stefan Büche Stefan Büche
Wed, 15 Feb 2012 14:08:05 +0100


Hi Jacqueline,

it looks like you are trying to run the test against your local machine 
(http://localhost), but no webserver seems to be running there 
(Connection Timed Out). The demo test should try to connect to the 
Google server www.google.com, so you should check your configuration, 
especially the Base URL given there.

Regards,
Stefan


Am 15.02.2012 13:56, schrieb Jacqueline Oliveira (JIRA):
> Error running demo tests
> ------------------------
>
>           Key: WT-574
>           URL: http://webtest-community.canoo.com/jira/browse/WT-574
>       Project: WebTest
>          Type: Bug
>
>      Versions: 3.0
>   Environment: java 1.7.0_02
> ant 1.8.2
>      Reporter: Jacqueline Oliveira
>   Attachments: WebTestReport.html.rb.htm
>
> I'm trying to learn how to use WebTest and followed all the steps described in the url  http://opensource.basehaus.com/webtest/screencasts/creating-a-first-webtest-project.htm, but it doesn't work.
> The test results show error in the invoke method, and all the steps faills.
> I've searched for information in the canoo webtest site and dind't find anything that could help me resolve this issue.
>
> Error:
>      x check that WebTest is Google's top 'WebTest' result
>      Test started at Wed Feb 15 09:05:26 GMT-03:00 2012, lasting 00:01:25 (85094 ms).
>      Source: C:\TestesCanoo\prjetoWeb\tests\googleWebTest.xml:9:
>      Base URL (used by invoke steps with a relative URL): http://localhost/
>
> Error
> Message
>
> Unexpected exception caught: java.net.ConnectException
> Location
>
> C:\TestesCanoo\prjetoWeb\tests\googleWebTest.xml (line: 10)
> Exception
>
> com.canoo.webtest.engine.StepExecutionException
> Hide Stacktrace
>
> C:\TestesCanoo\prjetoWeb\tests\googleWebTest.xml:10: Unexpected exception caught: java.net.ConnectException
> 	at com.canoo.webtest.steps.StepUtil.handleException(StepUtil.java:120)
> 	at com.canoo.webtest.steps.Step.handleException(Step.java:387)
> 	at com.canoo.webtest.steps.Step.execute(Step.java:118)
> 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)
> 	at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)
> 	at com.canoo.webtest.steps.Step.execute(Step.java:103)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at com.canoo.webtest.ant.WebtestTask.executeSteps(WebtestTask.java:236)
> 	at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:208)
> 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at org.apache.tools.ant.Target.execute(Target.java:390)
> 	at org.apache.tools.ant.Target.performTasks(Target.java:411)
> 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
> 	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
> 	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
> 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at org.apache.tools.ant.Target.execute(Target.java:390)
> 	at org.apache.tools.ant.Target.performTasks(Target.java:411)
> 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
> 	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
> 	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
> 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at org.apache.tools.ant.Target.execute(Target.java:390)
> 	at org.apache.tools.ant.Target.performTasks(Target.java:411)
> 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
> 	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
> 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
> 	at org.apache.tools.ant.Main.runBuild(Main.java:809)
> 	at org.apache.tools.ant.Main.startAnt(Main.java:217)
> 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
> 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> Caused by: java.net.ConnectException: Connection timed out: connect
> 	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
> 	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)
> 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
> 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
> 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> 	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
> 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
> 	at java.net.Socket.connect(Socket.java:579)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
> 	at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)
> 	at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
> 	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:97)
> 	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1487)
> 	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1445)
> 	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:323)
> 	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:400)
> 	at com.canoo.webtest.steps.request.TargetHelper.getResponse(TargetHelper.java:69)
> 	at com.canoo.webtest.steps.request.AbstractTargetAction.getResponse(AbstractTargetAction.java:66)
> 	at com.canoo.webtest.steps.request.InvokePage.findTarget(InvokePage.java:160)
> 	at com.canoo.webtest.steps.request.AbstractTargetAction.doExecute(AbstractTargetAction.java:72)
> 	at com.canoo.webtest.steps.Step.execute(Step.java:103)
> 	... 57 more
>
>
>