[Webtest] new custom steps VerifyCookie and StoreCookie added to community web site

Paul King webtest@lists.canoo.com
Fri, 13 Aug 2004 18:54:23 +1000


StoreCookie and VerifyCookie

These custom steps allow storing/checking cookie values. To make use of 
the storeCookie step, you will most likely need to use the 
VerifyProperty custom step.

Note: If the VerifyProperty step (or something similar) becomes part of 
the main distribution, then it might be best to remove the verifyCookie 
step which can be simulated using storeCookie followed by verifyProperty.

   <testSpec name="testHeaderField">
     <invoke stepid="Load Initial Page" url="/"/>
     <storeCookie stepid="store cookie"
       name="JSESSIONID" property="sessioncookie"/>
     <!-- check that session was created -->
     <verifyProperty stepid="check for cookie"
       property="sessioncookie" regex="true" text=".*"/>
     <invoke stepid="Load Initial Page again" url="/"/>
     <!-- check that session didn't break -->
     <verifyCookie stepid="check cookie didn't change"
       name="JSESSIONID" text="#{sessioncookie}"/>