[Webtest] Re: Connection timed out error

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Fri, 24 Nov 2006 10:05:31 +0100

Hi John,

John and Pip wrote:
> 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?

unless you configure webtest to ignore it, your test would fail.

> 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")!

never tried with ant 1.7 (yes, I should). Have you tried with Ant 1.6.5? 
Otherwise you can modify the webtest.bat script to remove the logger 

> 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=" <>" 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 
> <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?

interesting. I think that you've hit a current limitation of WebTest 
(please open a bug issue for it). WebTest just reads the proxy settings 
configured with setproxy but doesn't rely on this mechanism. As far as I 
remember, the nonproxyhosts are not considered currently (perhaps 
htmlunit couldn't handle it at the time we've introduced this 
functionality in WebTest). Until this gets fixed you can use following 
groovy step as workaround within your webtest
<groovy description="finer proxy configuration">
(caution: I haven't executed it therefore it may contain errors ;-))

I think that the community page you refer too is totally outdated. The 
NTLM configuration settings should all be in htmlunit since a long time.