[Webtest] webtest supports cookie ?

david webtest@lists.canoo.com
Fri, 31 Jan 2003 23:26:13 +0800


This is a multi-part message in MIME format.

------=_NextPart_000_002E_01C2C980.24ED8D20
Content-Type: text/plain;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

Is webtest allow me to set a cookie in request ?

I tried to add a <header> in <config> to set a cookie like below.
However, the cookie is set for 1st invoke only but not set for 2nd =
invoke.=20
Why ?


     <testSpec name=3D"myTest">
         <config=20
            host=3D"localhost"
            port=3D"8000"
            protocol=3D"http"
>
      <header name=3D"Cookie" value=3D"abc=3D123"/>
         </config>
         <steps>
            <invoke=20
               stepid=3D"get Login Page"
               url=3D"Logon.jsp" />

               stepid=3D"get Login Page"
               url=3D"Test.jsp" />
         </steps>
      </testSpec>
   
------=_NextPart_000_002E_01C2C980.24ED8D20
Content-Type: text/html;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dbig5">
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Is webtest allow me to set a cookie in =
request=20
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I tried to add a &lt;header&gt; in =
&lt;config&gt;=20
to set a cookie like below.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>However, the cookie is set for 1st =
invoke only but=20
not set for 2nd invoke. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Why ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; &lt;testSpec=20
name=3D"myTest"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;config=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
host=3D"localhost"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;=20
port=3D"8000"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;=20
protocol=3D"http"<BR>&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;header=20
name=3D"Cookie"=20
value=3D"abc=3D123"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;=20
&lt;/config&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;steps&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;=20
&lt;invoke=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;=20
stepid=3D"get Login=20
Page"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
url=3D"Logon.jsp" /&gt;<BR></FONT><FONT face=3DArial =
size=3D2></FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
stepid=3D"get Login=20
Page"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
url=3D"Test.jsp" /&gt;</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/steps&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/testSpec&gt;<BR>&nbsp;&nbsp; </FONT></DIV></BODY></HTML>

------=_NextPart_000_002E_01C2C980.24ED8D20--