Cookies set using <header> do not last past the first invoke in a single webtest
--------------------------------------------------------------------------------

         Key: WT-442
         URL: http://webtest-community.canoo.com/jira/browse/WT-442
     Project: WebTest
        Type: Bug

    Versions: 2.6    
    Reporter: Robert Calder


I can't get a cookie I have "set" at the start of a TC using <header> to stay 
around. I know I can't persist a cookie across multiple tests with WebTest, but 
my understanding of the documentation is that  I should be able to persist a 
cookie within a single TC this way. 
  
For example, I have a site that will display a different page to a user 
dependent upon a cookie value. There is a default view, then explicitly set 
other views. Every page checks that cookie to determine what the user sees. The 
"easy" way to make sure I am looking at the right page is through a 
verifyTitle. For this example, assume the possible titles are "Yes" and "No". 
Any help? Is this a bug?
  
So I want to do something like this: 
<config haltonfailure="false">
        <header name="Cookie" value="bob=yes">        </header> 
</config>

<invoke url="somepage1"></invoke>
<!-- The following will PASS -->
<verifyTitle text="Title I Expect"> </verifyTitle>

<!-- I tried the following scenarios individually following the first 
invoke...all of them fail. They work fine through a "normal" browser since the 
cookie stays set. -->
<clickLink label="some label"> </clickLink>
<!-- The following will FAIL -->
<verifyTitle text="Title I Expect"></verifyTitle>

<invoke url="sonofsomepage1"></invoke>
<!-- This would also FAIL -->
<verifyTitle text="Title I Expect"></verifyTitle>

<invoke url="somepage1"></invoke>
<!-- Even re-invoking the first page will FAIL -->
<verifyTitle text="Title I Expect"> </verifyTitle>
 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to