if I correctly remember, setProxy must be called before <webtest>

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com


George Policello wrote:
> This dataDriven loop (see below) needs to repeat and reset the proxy
> each time through. However, after the first time through, it throws an 
>     Unexpected exception caught: java.net.UnknownHostException
> on the proxy, not the URL, at the invoke step, not the <setproxy .../>
> step.
> 
> It is impossible to continue the subsequent tests after the first one
> finishes successfully. If the code is altered to set the proxy outside
> the dataDriven loop, it works fine up to the first failure.
> 
> It appears that the 
>  
> .../steps.control.MultipleExecutionStepContainer.ProxiesResettingGroupSt
> ep
> class should be taking care of this inside the dataDriven loop but it
> does not seem to be doing that.
> 
> Is there a way to make the <setproxy ... /> take and work without
> writing new Webtest base code; I suppose writing would not be difficult
> but building might?
> 
> The Groovy stuff in the <scriptStep ... />'s is working fine, returns a
> Port number as the output from the <echo message=...> steps below
> indicates.
> 
> The "HERE" in the <echo... />'s is to make grepping the messages out
> easier.
> ====================================
> CODE
> ====================================
> LOTS OF ANT (not dynamic) PROPERTY SETTING CODE THAT IS WORKING FINE IN
> OTHER APPLICATIONS. It is used inside the Groovy <scriptStep .../> code
> as indicated below in the output from the <echo message= ... />
> messages.
> 
>   <target name="DataDrivenTest">
> 
>     <dataDriven tableContainer="NoProxy_Domain_Pages_Four_Rows.xls" >
>       <webtest name="Test Getting http://${URL}"; >
> 
>       <group description="Get http://${URL}";>
> 
>           <!-- Set the Zelig proxy as the way to obtain web pages. -->
> <echo message='HERE BEFORE GET PORT  ${zeligPort} #{zeligPort}
> ${zeligURL}' />
>           <!-- Get the new Server Port, #{zeligPort} -->
>           <scriptStep description="Start New Server" language="groovy"
> src='startZeligServer.groovy'/>
> <echo message='HERE AFTER  GET PORT  ${zeligPort} #{zeligPort}
> ${zeligURL}' />
> 
>           <setproxy proxyhost='${zeligURL}' proxyport='#{zeligPort}' />
> <echo message='HERE AFTER  SET PROXY ${zeligPort} #{zeligPort}
> ${zeligURL}' />
> 
>           <!-- Get the specified page and check the title. -->
>           <invoke url="http://${URL}"; description="http://${URL}"; />
>           <verifyTitle text="${Title}" />
> 
>           <scriptStep description='Stop Previous Server'
> language='groovy' src='stopZeligServer.groovy'/>
> 
>         </group>
> 
>       </webtest>
>     </dataDriven>
> 
>   </target>
> ====================================
> 
> ====================================
> <echo message= ... /> lines.
> The ${zeligPort} ANT Property is there
>     to check for cross talk.
> None occurred.
> ====================================
> FirstMultiplePageCrawls> grep HERE tmp
>      [echo] HERE BEFORE GET PORT  ${zeligPort} #{zeligPort}
> http://us.zelig
>      [echo] HERE AFTER  GET PORT  ${zeligPort} 19384 http://us.zelig
>      [echo] HERE AFTER  SET PROXY ${zeligPort} 19384 http://us.zelig
>      [echo] HERE BEFORE GET PORT  ${zeligPort} #{zeligPort}
> http://us.zelig
>      [echo] HERE AFTER  GET PORT  ${zeligPort} 18720 http://us.zelig
>      [echo] HERE AFTER  SET PROXY ${zeligPort} 18720 http://us.zelig
> <The above steps succeed!/>
> <Throws UnknownHostException at the <invoke step for the second item./>
>      [echo] HERE BEFORE GET PORT  ${zeligPort} #{zeligPort}
> http://us.zelig
>      [echo] HERE AFTER  GET PORT  ${zeligPort} 18720 http://us.zelig
>      [echo] HERE AFTER  SET PROXY ${zeligPort} 18720 http://us.zelig
>      [echo] HERE BEFORE GET PORT  ${zeligPort} #{zeligPort}
> http://us.zelig
>      [echo] HERE AFTER  GET PORT  ${zeligPort} 18720 http://us.zelig
>      [echo] HERE AFTER  SET PROXY ${zeligPort} 18720 http://us.zelig
> ====================================
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to