| || |
I am having the most difficult time getting ACT to handle cookies correctly. I set the cookie header to "automatic" so ACT can handle them, but of the following Response headers:
Expires: Tue, 06 Jan 2004 00:42:35 GMT
Set-Cookie: nPo=3760=1; expires=Thu, 06-Jan-2005 00:42:34 GMT; domain=.trafficmpqa.com; path=/
Set-Cookie: nCr=10108=1; expires=Thu, 06-Jan-2005 00:42:34 GMT; domain=.trafficmpqa.com; path=/
Set-Cookie: TMPCrByAS=AS1096=10108; expires=Fri, 06-Feb-2004 00:42:34 GMT; domain=.trafficmpqa.com; path=/
Set-Cookie: nAs=1096=1; expires=Thu, 06-Jan-2005 00:42:34 GMT; domain=.trafficmpqa.com; path=/
Set-Cookie: TMPFreqCap=AS1096=2110602; expires=Fri, 06-Feb-2004 00:42:34 GMT; domain=.trafficmpqa.com; path=/
Set-Cookie: TMPPOByAS=AS1096=3760; expires=Fri, 06-Feb-2004 00:42:34 GMT; domain=.trafficmpqa.com; path=/
Set-Cookie: ASPSESSIONIDCSBTRTTD=HJOJIDOAIIPJJBGPMEPCICFB; path=/
Cache-control: private, no-cache="Set-Cookie"
Only the last set-cookie: header gets written to the cookie. Does ACT have a problem handling the " domain=.trafficmpqa.com; path=/" response? In other words, my site feeds two cookies to each user. WAS doesn't have a problem handling it, but MS ACT does. Anyone here have any advice? Any advice on cookie handling would be useful. Thanks!
Re: Handling cookies...
In some instances, you may need to write a custom function that manually grabs the cookie items, and manually sets them when posting. I haven't worked with a 2-cookie situation, but there was one instance where I had to grab information out of the cookie object to upload as form data in the following post. I have at least that much as sample code if you think that would help. I'd have to e-mail it, as the server here freaks (due to all the Get-Cookie type functions) when I post it here.
I prefer 'maliciously mischevious'.
TDAdmin of Evil
Re: Handling cookies...
I was afraid of that! I tried fussing with the users and user groups and all that junk, but no dice. I was trying to avoid having to cap the info manually, and passing it as a variable. I am not sure that is even allowed? Isn't that what the cookie ("automatic") is supposed to do? Please send me any code you think might help. I can send you what I have? This is my e-mail address: email@example.com . By the way, I use the .Net IDE to write and alter the code. I usually run the tests from there, and I also run them from the stand-alone act. I would preffer running them from within the IDE entirely.
The weird thing is that when I use the recorder with ACT everything works just perfect, but as soon as I run the recorded code, it doesn't write the cookies correctly. I use the recorder to generate test code, then I tailor it to my needs. Useful tool, but I don't see WHY ON EARTH it would write cookies correctly while recording and not while playing back? If you go to edit the cookies, the info is there
I deffinintly need to add cookie cycling and user cycling within my Dynamic tests. I do some rudimentary stuff...Would you know how to do that? I have that book about .NET testing and stuff, which has a chapter on ACT, but it's only slightly better than the half-assed documentation that comes with ACT. Would you know any other books specifically on ACT?