[Webtest] Cookies and Redirection

Marc Guillemot webtest@lists.canoo.com
Fri, 12 May 2006 15:28:06 +0200


Hi,

I suppose that it shows a problem with your servers. As such it could be
interesting to fix it.

If not possible, you can try an other cookie policy that may be more
lenient, for instance by adding the follwing step at the first position
of your <webtest>

<groovy description="Change cookie policy to: ignore cookies">
  import org.apache.commons.httpclient.cookie.CookiePolicy
  import org.apache.commons.httpclient.params.*

  ((HttpClientParams)
DefaultHttpParams.getDefaultParams()).setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
</groovy>

Marc.

work wrote:
> Not exactly sure how to explain this.  We have 2 servers. 1 runs the
> application and 1 runs the single signon.
> I have webtest script that works just fine when I run it locally,
> bypassing the single signon server.  However, when I run the script
> using the single signon server, I get the following:
> [clickButton]  INFO (org.apache.commons.httpclient.HttpMethodDirector) -
> Redirect requested but followRedirects is disabled
> [clickButton]  WARN (org.apache.commons.httpclient.HttpMethodBase) -
> Cookie rejected: "$Version=0;
> JSESSIONID=86459A6A873CF58D6D88B16B5CAC0C60; $Path=/access/;
> $Domain=name.com". Illegal path attribute "/appl/". Path of origin:
> "/signon/page/"
> [clickButton]  INFO (org.apache.commons.httpclient.HttpMethodDirector) -
> Redirect requested but followRedirects is disabled
> [clickButton]  INFO (org.apache.commons.httpclient.HttpMethodDirector) -
> Redirect requested but followRedirects is disabled
> The test fails because it can't find the right items after that. 
> Basically, it isn't forwarding to the application server and is
> failing.  Any ideas?
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> 
>