[Webtest] Proxy authentication
Marc Guillemot
webtest@lists.canoo.com
Mon, 11 Apr 2005 16:17:59 +0200
Hi Paul,
I don't have to use webtest/htmlunit with a proxy, there fore I'm not 100% sure.
I think that webtest doesn't provide currently anything to test through a proxy. Yes, it would worth building it into
webtest. I guess that the proxy name and port informations should be in the <configuration> because they have to be
available at WebClient's instanciation.
Marc.
paul_devine@visi.com wrote:
> Hi
>
> I am using webtest-1.7-R_751. My webtest needs to authenticate with
> username/password to an internal proxy to get at the app it's testing. From
> the list archives and limited analysis I've done it looks like:
>
> 1. ant's (optional) `setproxy` task does not seem to allow me to do this- it
> sets up system properties that are used by the jdk's java.net
> Http(s)URLConnection classes, whereas these system properties do not seem to be
> used by httpclient (webtest->htmlunit->httpclient.)
> 2. I can't see any configuration options for this is in webtest itself, or
> direct support in the source code. In the code a new htmlunit WebClient()
> instance is created in the Setup step, but i can't see a call anywhere to
> `setCredentials` on the WebClient.
>
> For now I've worked my way through this by a writing a webtest extension step
> that sets credentials on the WebClient instance, i invoke the step before any
> others in the testSpec. If someone knows of an easier solution to this I would
> appreciate the help (I'm probably overlooking something easier.)
> Alternatively, if there is no in built support, is this something worth
> building into webtest (albeit in a more robust way than i have done) ? I'd be
> happy to help out in this regard if so.
>
> Thanks
> -- Paul Devine
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>