[Webtest] <setProxy..> versus <config...><proxy../></config>

Marc Guillemot webtest@lists.canoo.com
Fri, 21 Oct 2005 13:03:17 +0200


Hi,

since integration of Paul Devine's patch, webtest can be configured to 
use a proxy:

<config ....>
   <proxy host="..." port="..." [user="..." [password="..."]]/>
</config>

Ant has already a task to set proxy configuration: <setProxy .../> 
(http://ant.apache.org/manual/OptionalTasks/setproxy.html)
This task sets some system properties that are currently absolutely not 
considered by webtest+htmlunit+commons-httpclient.

I think that we should try to "use" this standard <setProxy/> rather 
than reinventing the wheel. It would make webtest more natural to use 
for experimented ant users.

In this case this would mean to deprecate the nested <proxy> task and 
that webtest should read the http.proxy* system properties that may have 
been set by the standard <setProxy../> task to properly configure the 
webclient before starting a webtest.

As we want to allow in the future any kind of ant tasks to be nested 
between webtest steps, we will have to take care to possible changes to 
proxy settings. I think that ant's API allows to track such events using 
BuildListener and that it therefore shouldn't be a motivation not to use 
<setProxy>.

Any comments?

Marc.