AW: AW: [Webtest] sessionid
Luca Scheuring
webtest@lists.canoo.com
Thu, 14 Oct 2004 15:20:14 +0200
if the session ID is only in the cookie and not e.g. in a url, you need =
the
extension step storeCookie to store the ID I guess. storeregex can only
match and store text within the body of a server response, not in the
header.
I don't know why exportProperty doesn't work in your case. I never used =
more
than one <step>-section within a testSpec. is there a special purpose? =
you
can use the extension step <group> to group your steps.
--luca
> Von: webtest-admin@lists.canoo.com=20
> [mailto:webtest-admin@lists.canoo.com] Im Auftrag von S=E9bastien =
Mathy
> Gesendet: Donnerstag, 14. Oktober 2004 15:16
> An: webtest@lists.canoo.com
> Betreff: Re: AW: [Webtest] sessionid
>=20
> Hi Lucas, thank for your answer.
> I have 2 problems:
> 1) exportProperty does work I I have more than one step in a=20
> testspec For example :
> <target name=3D"case">
> <testSpec name=3D"Login test" description=3D"Test the login =
procedure">
> &config;
> <steps>
> <invoke stepid=3D"get Login Page" url=3D"login.php" />
> <clickbutton name=3D"login" stepid=3D"Click">
> <index value=3D"0" />
> </clickbutton>
> <exportProperty name=3D"var" value=3D"toto"/>
> </steps>
> </testSpec>
> <echo message=3D"${var}"></echo>
> </target>
>=20
> works but :
> <target name=3D"case">
> <testSpec name=3D"Login test" description=3D"Test the login =
procedure">
> &config;
> <steps>
> <invoke stepid=3D"get Login Page" url=3D"login.php" />
> <clickbutton name=3D"login" stepid=3D"Click">
> <index value=3D"0" />
> </clickbutton>
> <exportProperty name=3D"var" value=3D"toto"/>
> </steps>
> <steps>
> <invoke stepid=3D"get Login Page" url=3D"login.php" />
> <clickbutton name=3D"login" stepid=3D"Click">
> <index value=3D"0" />
> </clickbutton>
> </steps>
> </testSpec>
> <echo message=3D"${var}"></echo>
> </target>
> doesn't work.
> Is it a bug?
>=20
> 2) How could I retrieve the cookie value?
> Could I use storeCookie or storeregex?
>=20
> Regards
>=20
> Luca Scheuring a =E9crit :
>=20
> > hi sebastien
> >=20
> > once you've extracted the session id (e.g. with=20
> storeregex), you can=20
> > make this dynamic property available outside the testSpec-tag by=20
> > exporting it with the extension step <exportproperty> (see=20
> > http://webtest-community.canoo.com/wiki/space/ExportProperty).
> >=20
> > I had the case where I needed access to a property file=20
> created in a=20
> > seperate ant project file that was called from the ant file where I=20
> > needed the property. since ant properties are not inherited=20
> "upwards",=20
> > I had to store this property to disk (in a property file) using the=20
> > optional ant task <propertyfile>. maybe this could be done=20
> more elegant...
> >=20
> > --luca
> >=20
> >=20
> >>-----Urspr=FCngliche Nachricht-----
> >>Von: webtest-admin@lists.canoo.com
> >>[mailto:webtest-admin@lists.canoo.com] Im Auftrag von=20
> S=E9bastien Mathy
> >>Gesendet: Donnerstag, 14. Oktober 2004 12:42
> >>An: webtest@lists.canoo.com
> >>Betreff: [Webtest] sessionid
> >>
> >>Hi,
> >>Another question,
> >>I would like to keep in different testspec my session alive.
> >>So I could invoke the url like this :=20
> >>http://myurl?SESSIONID=3D${sessionid}
> >>But how could I store sessionid in a global property?
> >>
> >>Thanks in advance
> >>
> >>--
> >>Sebastien Mathy
> >>
> >>
> >=20
> >=20
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
> >=20
> >=20
>=20
>=20
> --
> Sebastien Mathy
> Ing=E9nieur de test
> __
>=20
> KEREVAL
> Immeuble Le Gallium
> 80, avenue des Buttes de Coesmes
> 35700 RENNES - FRANCE
> http://www.kereval.com
>=20