So I've encountered some peculiar behavior and I was wondering if
something as such has been seen before.

Basically we must login to one site before we login into another where
the actual web testing can be done.

Click button etc. work only when logging into the first site. The only
way I can click buttons etc subsequently is through POST invoke
statements.

Additionally, even though the POST statements click the buttons and I
can navigate throughout the site, when I submit any transaction test or
search history or any meaningful post, it requests me to login to the
nested/second site again.

I suspect cookies to be the issue. In specific they are not RFC 2109
compliant which has been the issue thus far. Basically when running in
normal default mode I get the following error to console:
   [invoke]  WARN (org.apache.commons.httpclient.HttpMethodBase) -
Cookie reject
ed: "$Version=0;
feel_cookie=61203137205F6C6F67696E2D70726F63657373696E672062203
0202063203620776562736372206420302020652032372067656E6572616C2F4C6F67696
E50726F6
3657373696E672E78736C20662030202067203520656E5F5553206820302020692032322
0702F676
56E2F6C6F67696E2D70726F63657373696E67206A203020206B2032352050726F6365737
3696E672
04C6F67696E202D2050617950616C206C20302020; $Path=/;
$Domain=.DOMAIN.com". Domain
 attribute ".DOMAIN.com" violates RFC 2109: host minus domain may not
contain an
y dots

To fix this issue I used the groovy step linked to a couple posts ago
with Browser compatability. As expected this warning did not come back
and supposedly the cookie is being dropped, however through looking at
my saved responses I am still seeing that a login is not successfully
happening with my POST invocation.

Any ideas?....Cookies may be the problem but it might not be the cookie
policy and more how they are being managed in webtest.

We have successfully used JMeter to test this web app, however we are
trying to move over to the lightweight and more user friendly webtest
scripts.

Thanks,
Sachin

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Guillemot
Sent: Thursday, July 19, 2007 11:16 AM
To: [email protected]
Subject: Re: [Webtest] RE: Cookies with WebTest

Hi,

you're right, the ignore cookie policy switch them off.

Doesn't the browser compatibility policy work?
In the worst case, if you have a server that sends such special cookie,
you can write your own policy.

Marc.

Thakkar, Sachin wrote:
> Thanks for the reply. I just tried that out and it seems that 
> HttpClient does not have any cookie policies that say basically don't 
> check against any RFC - I believe Ignore Cookies turns off cookies all
together.
> 
> Am I wrong in any of my previous statements? (I'm rather new to the 
> Apache packages)
> 
> Thanks,
> Sachin
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Marc Guillemot
> Sent: Monday, July 16, 2007 1:27 AM
> To: [email protected]
> Subject: [Webtest] RE: Cookies with WebTest
> 
> 
> Hi,
> 
> you can change the cookie policy to any of HttpClient's policy (or 
> your own). Have a look for instance at this older post in the mailing 
> list for
> instance:
>
http://www.nabble.com/Change-Cookie-Policy-with-a-Groovy-step-tf1474639.
> html#a3988557
> 
> Marc.
> 
> 
> Thakkar, Sachin wrote:
>> I believe the issue is that the cookies aren't compliant with RFC 
>> 2109
> 
>> and that is the problem that prevents the cookies from being stored. 
>> Is there any way to disable the fact that cookie compliance is
> checked.
>> FYI I do not have access to server cookie types.
>>
>> Thanks,
>> Sachin
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Marc Guillemot
>> Sent: Thursday, July 12, 2007 1:50 AM
>> To: [email protected]
>> Subject: Re: [Webtest] Cookies with WebTest
>>
>>
>> Hi,
>>
>> normally cookies handling works just fine. Nevertheless some server 
>> sends cookies in a non standard format, what could be a cause of 
>> problem.
>>
>> The best thing to do is probably to change the log level to see the 
>> http traffic (see lib/log4j.properties) and to compare the cookies 
>> sent and received with some sent and received by a "normal" browser 
>> (liveHttpHeaders is a nice Firefox addon for this purpose).
>>
>> Marc.
>>
>>
>> Thakkar, Sachin wrote:
>>> Hi,
>>>
>>> I was using WebTest to do some HTML app testing and encountered a 
>>> few
> 
>>> problems which I believe are related to cookies. I have to login to 
>>> a
> 
>>> website to gain access to the sandbox I am testing in. I must enter 
>>> a
> 
>>> different login once in the sandbox to complete the login process 
>>> and
> 
>>> get access to the URLs I must test. I am new to WebTest so please 
>>> correct me if I am wrong.
>>>
>>> I am able to successfully login to the first site and get to the 
>>> login page of the particular sandbox I want access to. I am quite 
>>> sure that
> 
>>> I am populating the login and password fields correctly yet after 
>>> click the login button, I get back to a page that says you must be 
>>> logged in to perform this action.
>>>
>>> By the way, there is an intermediary processing login page that I 
>>> must go through to get to a successful login complete page. I do 
>>> this by sleep for a given amount of time and then invoking a proper 
>>> page.
>>> This
>>> worked perfectly for the first login but does not work for the
> second.
>>> Due to the similar method, I am led to believe it is an issue with 
>>> cookies rather than this login redirect page.
>>>
>>> Thanks in advance for the help.
>>>
>>>
>> --
>> View this message in context:
>> http://www.nabble.com/Cookies-with-WebTest-tf4059337.html#a11555963
>> Sent from the WebTest mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> WebTest mailing list
>> [email protected]
>> http://lists.canoo.com/mailman/listinfo/webtest
>> _______________________________________________
>> WebTest mailing list
>> [email protected]
>> http://lists.canoo.com/mailman/listinfo/webtest
>>
>>
> 
> --
> View this message in context:
> http://www.nabble.com/Cookies-with-WebTest-tf4059337.html#a11610996
> Sent from the WebTest mailing list archive at Nabble.com.
> 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 

_______________________________________________
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