[Webtest] Connection timed out error

John and Pip John and Pip" <pipandjohn@gmail.com
Fri, 24 Nov 2006 10:25:38 +1300


------=_Part_88441_22391812.1164317138153
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Marc (and Dennis who I guess must have emailed you directly),

Really appreciate your response and advice.

On these pages I don't get javascript errors when I run the script - only
when I open the saved pages, so thanks for the explanation of that. I'm
curious what would happen in the script if a page had a standard, harmless,
javascript error in it?

re the logs: There is not cruise.console.log.xml or anything like this on my
C:\ drive. I tried editing log4j.properties and uncommenting all the logging
lines, but can't find where the logs are actually written and not sure
whether this was a sensible thing to do anyway. Then I downloaded Ant (
1.7ORC) and ran it and suddenly millions of screens of output from such a
simple command line ("ant")!

This seems to show the problem as being that I run tests against an internal
host (aklia781:57106) which doesn't require a proxy, but the page causing
the problem is accessing https://ssl.google-analytics.com/urchin.js which is
not available without going through a proxy. However, Air NZ uses NTLM proxy
so I have been using ntlmaps-0.9.9 to give WebTest external access, but when
I try to set this up so it still allows access to the internal host by
doing:

<setproxy proxyhost="127.0.0.1" proxyport="5865" nonproxyhosts="aklia781"/>
the nonproxyhosts bit doesn't seem to work and I get an error 503 from
http://aklia781:57106/isbook_en_NZ/book/?">http://aklia781:57106/isbook_en_NZ/book/Service
unavailable seems odd but is the same error I get if I remove the
nonproxyhosts bit.

Then I tried the WebTest proxy entry instead, nested in config element as
described in http://webtest-community.canoo.com/wiki/space/NTLM+Proxy+Patch but
of course it doesn't work saying "config does not support the nested proxy
element", which agrees with the manual and I guess means that Daniel
Gredler's patch never made it into the official version.
<http://webtest-community.canoo.com/wiki/space/NTLM+Proxy+Patch>Do you know
why that is? It sounds as though it may be what I need. Alternatively am I
doing something wrong with the Ant proxy command - particularly the
nonproxyhosts bit?

re the Automated Tools choice: I agree there is a required technical aspect.
Our goal is to set up the equivlent of what fitnesse calls "fixtures" i.e.
set up WebTest scripts that provide the "glue" to link test cases to the web
application, in a sufficiently generic way that non-technical testers, BAs
etc can modify not just the data used but the flow of the test, without
technical intervention. This approach is described quite well under the name
"Keyword Driven Approach" at http://www.kjross.com.au/smartest/. I would
only use a capture tool as an aid and indeed use WebTest Recorder this way.

regards,
         John

On 11/23/06, Marc Guillemot <mguillemot@yahoo.fr > wrote:
>
> Hi John,
>
> I guess that you're original mail has been rejected from the mailing
> list due to the attachments (I haven't looked at them either as it would
> take me too much time).
>
> Can you run you WebTest directly with ant rather than with the
> webtest.bat script or look if a cruise.console.log.xml file has been
> generated? The stacktrace I'm looking for should be displayed on the
> console (or in the log file).
>
> -----
> @Denis:
> is the execution log intentionaly hidden? Personally I use the
> webtest.{bat|sh} scripts only to build webtest and dislike using them
> when I run my own WebTests. If it is not the case, what about moving the
> logger settings from the shell script to the cruise caller?
> -----
>
> The js errors you see when opening result files saved by WebTest are
> probably normal as the references to external js files are lost. The js
> error you get when running the tests is probably an other problem.
>
> Concerning your automated test tools choice, I don't wont rail against
> testing tools here but remember that test automation is a software
> engineering activity. Non technical testers can surely generate some
> tests that can be run but creating test suites that are easily
> maintainable over a long time requires other skills. Captured script are
> typically not really adaptable and require re-recording what is not the
> best way to prevent for regression (we develop it a bit in our OOPSLA
> abstract
> http://webtest.canoo.com/webtest/manual/externalCitations/OOPSLA2006_WebTestAbstract.pdf
> ).
>
> Marc.
>
>
> John and Pip wrote:
> > Hi Marc,
> >
> > All that I see in the DOS console is:
> >
> > C:\WebTest\doc\ISIS>webtest -buildfile tempTest.xml
> >
> > BUILD FAILED
> > C:\WebTest\doc\ISIS\tempTest.xml:11: Canoo Webtest: R_1438.
> > Test failed.
> > Test step steps (C:\WebTest\doc\ISIS\tempTest.xml:13: ) null failed with
> > message
> >  "Step[clickLink "Submit" (47/50)]: Script error loading page executing
> > webtest
> > at: clickLink Wrapped com.gargoylesoftware.htmlunit.ScriptException:
> > Connection
> > timed out: connect (Wrapper definition for javascript url#1)
> > Source code:
> > GargoyleWrapper8()"
> >
> > Total time: 50 seconds
> >
> > I've also attached the results.xml. I don't think there is any more
> > useful detail here. Is there some other log file produced or some way to
> > turn debug logging on?
> >
> > I've also attached the final "screen" capture file. I had neglected to
> > mention that there is a javascript error when I open that file in a
> > browserbut I doubt that has anything to do with it because the page
> > actually must be getting submitted as I get a booking in the system.
> > Webtest just doesn't seem to then get to the next page. Also hard to
> > report the javascript error to the development team as a defect because
> > it only appears in the saved WebTest HTML file, not in real use. I've
> > shown this in screenshots in the Word doc attachment.
> >
> > re the href:
> >
> > The form is defined with:
> > <form method="post" action="/isbook_en_NZ/book/reviewAndPurchaseCash.do"
>
> > onsubmit="pleaseWait(); calChecksum(); return true;"
> > id="reviewAndPurchaseCashForm">
> >
> > and the button/link to complete purchase as:
> >
> > <a
> >
> href="javascript:pleaseWait();calFormChecksum();MM_findObj('reviewAndPurchaseCashForm').submit();">
>
> >
> > <img src="../images/btnpurchase.gif"
> >         width="139" height="20" border="0"
> >         alt="Purchase Tickets" />
> > </a>
> >
> > so I don't think there is much choice. The problem is the development
> > team attempt to make these pages hard for robots to navigate (close to
> > impossible in production by randomising control names) but I can get
> > round it to some extent in test environment. However, asking them to
> > modify code is expensive and I'd rather avoid it if at all possible.
> >
> > Another tool I'm looking at (QEngine) identifies this control with a map
>
> > file entry:
> > <ELEMENT ID="[this is the local name the tool uses so not related to the
> > HTML]" alt="Purchase Tickets" browser=" IE6.0" class="NONE"
> > formname="NONE" id="NONE" index="0" name="NONE"
> > source="http://aklia781:57106/isbook_en_NZ/images/btnpurchase.gif
> > < http://aklia781:57106/isbook_en_NZ/images/btnpurchase.gif>"
> > sourceindex="359" tagName="IMG" title="NONE" tooltip="NONE"
> value="NONE"/>
> >
> > so not sure whether I could refer to the image or better yet the alt tag
>
> > rather than to the html in WebTest? Ah, I suppose this is where I would
> > use the xpath parameter to clickLink right? I guess I could also put in
> > a request to have alt added as an option to clickLink?
> >
> >
> > thanks and regards,
> >                     John
>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

------=_Part_88441_22391812.1164317138153
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Marc (and Dennis who I guess must have emailed you directly),<br><br>Really appreciate your response and advice.<br><br>On these pages I don't get javascript errors when I run the script - only when I open the saved pages, so thanks for the explanation of that. I'm curious what would happen in the script if a page had a standard, harmless, javascript error in it?
<br><br><span style="font-weight: bold;">re the logs: </span>There is not cruise.console.log.xml or anything like this on my C:\ drive. I tried editing log4j.properties and uncommenting all the logging lines, but can't find where the logs are actually written and not sure whether this was a sensible thing to do anyway. Then I downloaded Ant (
1.7ORC) and ran it and suddenly millions of screens of output from such a simple command line (&quot;ant&quot;)!<br><br><span style="font-weight: bold;">This seems to show the problem </span>as being that I run tests against an internal host (aklia781:57106) which doesn't require a proxy, but the page causing the problem is accessing 
<a href="https://ssl.google-analytics.com/urchin.js" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://ssl.google-analytics.com/urchin.js</a> which is not available without going through a proxy. However, Air NZ uses NTLM proxy so I have been using 
ntlmaps-0.9.9 to give WebTest external access, but when I try to set this up so it still allows access to the internal host by doing:
<br><br><span style="font-weight: bold;">&lt;setproxy </span>proxyhost=&quot;<a href="http://127.0.0.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">127.0.0.1</a>&quot; proxyport=&quot;5865&quot; nonproxyhosts=&quot;aklia781&quot;/&gt; the nonproxyhosts bit doesn't seem to work and I get an error 503 from 
<a href="http://aklia781:57106/isbook_en_NZ/book/?" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://aklia781:57106/isbook_en_NZ/book/?</a>&quot;&gt;<a href="http://aklia781:57106/isbook_en_NZ/book/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://aklia781:57106/isbook_en_NZ/book/</a> Service unavailable seems odd but is the same error I get if I remove the nonproxyhosts bit.
<br><br>Then I tried the WebTest proxy entry instead, nested in config element as described in <a href="http://webtest-community.canoo.com/wiki/space/NTLM+Proxy+Patch" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://webtest-community.canoo.com/wiki/space/NTLM+Proxy+Patch
</a> but of course it doesn't work saying &quot;config does not support the nested proxy element&quot;, which agrees with the manual and I guess means that <span style="font-weight: bold;">Daniel Gredler's patch </span>never made it into the official version. 
<a href="http://webtest-community.canoo.com/wiki/space/NTLM+Proxy+Patch" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"></a>Do you know why that is? It sounds as though it may be what I need. Alternatively am I doing something wrong with the Ant proxy command - particularly the nonproxyhosts bit?
<br><br><span style="font-weight: bold;">re the Automated Tools choice: </span>I agree there is a required technical aspect. Our goal is to set up the equivlent of what fitnesse calls &quot;fixtures&quot; i.e. set up WebTest scripts that provide the &quot;glue&quot; to link test cases to the web application, in a sufficiently generic way that non-technical testers, BAs etc can modify not just the data used but the flow of the test, without technical intervention. This approach is described quite well under the name &quot;Keyword Driven Approach&quot; at 
<a href="http://www.kjross.com.au/smartest/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.kjross.com.au/smartest/</a><span>. I would only use a capture tool as an aid and indeed use WebTest Recorder this way.
<br><br>regards,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; John<br></span><br>

<div><span class="gmail_quote">On 11/23/06, <b class="gmail_sendername">Marc Guillemot</b> &lt;<a href="mailto:mguillemot@yahoo.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mguillemot@yahoo.fr
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi John,<br><br>I guess that you're original mail has been rejected from the mailing<br>list due to the attachments (I haven't looked at them either as it would<br>take me too much time).<br><br>Can you run you WebTest directly with ant rather than with the
<br>webtest.bat script or look if a cruise.console.log.xml file has been<br>generated? The stacktrace I'm looking for should be displayed on the<br>console (or in the log file).<br><br>-----<br>@Denis:<br>is the execution log intentionaly hidden? Personally I use the
<br>webtest.{bat|sh} scripts only to build webtest and dislike using them<br>when I run my own WebTests. If it is not the case, what about moving the<br>logger settings from the shell script to the cruise caller?<br>-----
<br><br>The js errors you see when opening result files saved by WebTest are<br>probably normal as the references to external js files are lost. The js<br>error you get when running the tests is probably an other problem.
<br><br>Concerning your automated test tools choice, I don't wont rail against<br>testing tools here but remember that test automation is a software<br>engineering activity. Non technical testers can surely generate some
<br>
tests that can be run but creating test suites that are easily<br>maintainable over a long time requires other skills. Captured script are<br>typically not really adaptable and require re-recording what is not the<br>best way to prevent for regression (we develop it a bit in our OOPSLA
<br>abstract<br><a href="http://webtest.canoo.com/webtest/manual/externalCitations/OOPSLA2006_WebTestAbstract.pdf" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://webtest.canoo.com/webtest/manual/externalCitations/OOPSLA2006_WebTestAbstract.pdf
</a>).<br><br>Marc.
<br><br><br>John and Pip wrote:<br>&gt; Hi Marc,<br>&gt;<br>&gt; All that I see in the DOS console is:<br>&gt;<br>&gt; C:\WebTest\doc\ISIS&gt;webtest -buildfile tempTest.xml<br>&gt;<br>&gt; BUILD FAILED<br>&gt; C:\WebTest\doc\ISIS\tempTest.xml:11: Canoo Webtest: R_1438.
<br>&gt; Test failed.<br>&gt; Test step steps (C:\WebTest\doc\ISIS\tempTest.xml:13: ) null failed with<br>&gt; message<br>&gt;&nbsp;&nbsp;&quot;Step[clickLink &quot;Submit&quot; (47/50)]: Script error loading page executing<br>&gt; webtest
<br>&gt; at: clickLink Wrapped com.gargoylesoftware.htmlunit.ScriptException:<br>&gt; Connection<br>&gt; timed out: connect (Wrapper definition for javascript url#1)<br>&gt; Source code:<br>&gt; GargoyleWrapper8()&quot;<br>


&gt;<br>&gt; Total time: 50 seconds<br>&gt;<br>&gt; I've also attached the results.xml. I don't think there is any more<br>&gt; useful detail here. Is there some other log file produced or some way to<br>&gt; turn debug logging on?
<br>&gt;<br>&gt; I've also attached the final &quot;screen&quot; capture file. I had neglected to<br>&gt; mention that there is a javascript error when I open that file in a<br>&gt; browserbut I doubt that has anything to do with it because the page
<br>&gt; actually must be getting submitted as I get a booking in the system.<br>&gt; Webtest just doesn't seem to then get to the next page. Also hard to<br>&gt; report the javascript error to the development team as a defect because
<br>&gt; it only appears in the saved WebTest HTML file, not in real use. I've<br>&gt; shown this in screenshots in the Word doc attachment.<br>&gt;<br>&gt; re the href:<br>&gt;<br>&gt; The form is defined with:<br>&gt; &lt;form method=&quot;post&quot; action=&quot;/isbook_en_NZ/book/reviewAndPurchaseCash.do&quot;
<br>&gt; onsubmit=&quot;pleaseWait(); calChecksum(); return true;&quot;<br>&gt; id=&quot;reviewAndPurchaseCashForm&quot;&gt;<br>&gt;<br>&gt; and the button/link to complete purchase as:<br>&gt;<br>&gt; &lt;a<br>&gt; href=&quot;javascript:pleaseWait();calFormChecksum();MM_findObj('reviewAndPurchaseCashForm').submit();&quot;&gt;
<br>&gt;<br>&gt; &lt;img src=&quot;../images/btnpurchase.gif&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width=&quot;139&quot; height=&quot;20&quot; border=&quot;0&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alt=&quot;Purchase Tickets&quot; /&gt;<br>&gt; &lt;/a&gt;
<br>&gt;<br>&gt; so I don't think there is much choice. The problem is the development<br>&gt; team attempt to make these pages hard for robots to navigate (close to<br>&gt; impossible in production by randomising control names) but I can get
<br>&gt; round it to some extent in test environment. However, asking them to<br>&gt; modify code is expensive and I'd rather avoid it if at all possible.<br>&gt;<br>&gt; Another tool I'm looking at (QEngine) identifies this control with a map
<br>&gt; file entry:<br>&gt; &lt;ELEMENT ID=&quot;[this is the local name the tool uses so not related to the<br>&gt; HTML]&quot; alt=&quot;Purchase Tickets&quot; browser=&quot; IE6.0&quot; class=&quot;NONE&quot;<br>&gt; formname=&quot;NONE&quot; id=&quot;NONE&quot; index=&quot;0&quot; name=&quot;NONE&quot;
<br>&gt; source=&quot;<a href="http://aklia781:57106/isbook_en_NZ/images/btnpurchase.gif" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://aklia781:57106/isbook_en_NZ/images/btnpurchase.gif</a>

<br>&gt; &lt;<a href="http://aklia781:57106/isbook_en_NZ/images/btnpurchase.gif" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://aklia781:57106/isbook_en_NZ/images/btnpurchase.gif</a>&gt;&quot;<br>&gt; sourceindex=&quot;359&quot; tagName=&quot;IMG&quot; title=&quot;NONE&quot; tooltip=&quot;NONE&quot; value=&quot;NONE&quot;/&gt;<br>&gt;<br>&gt; so not sure whether I could refer to the image or better yet the alt tag
<br>&gt; rather than to the html in WebTest? Ah, I suppose this is where I would<br>&gt; use the xpath parameter to clickLink right? I guess I could also put in<br>&gt; a request to have alt added as an option to clickLink?
<br>&gt;<br>&gt;<br>&gt; thanks and regards,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; John<br><br><br>_______________________________________________<br>WebTest mailing list<br><a href="mailto:WebTest@lists.canoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

WebTest@lists.canoo.com
</a><br><a href="http://lists.canoo.com/mailman/listinfo/webtest" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.canoo.com/mailman/listinfo/webtest</a><br></blockquote></div><br>



------=_Part_88441_22391812.1164317138153--