4 messages in com.canoo.lists.webtestRe: AW: [Webtest] sessionid
FromSent OnAttachments
Sébastien Mathy14 Oct 2004 03:41 
Luca Scheuring14 Oct 2004 04:50 
Sébastien Mathy14 Oct 2004 06:15 
Luca Scheuring14 Oct 2004 06:19 
Subject:Re: AW: [Webtest] sessionid
From:Sébastien Mathy (seba@kereval.com)
Date:10/14/2004 06:15:49 AM
List:com.canoo.lists.webtest

Hi Lucas, thank for your answer. I have 2 problems: 1) exportProperty does work I I have more than one step in a testspec For example : <target name="case"> <testSpec name="Login test" description="Test the login procedure"> &config; <steps> <invoke stepid="get Login Page" url="login.php" /> <clickbutton name="login" stepid="Click"> <index value="0" /> </clickbutton> <exportProperty name="var" value="toto"/> </steps> </testSpec> <echo message="${var}"></echo> </target>

works but : <target name="case"> <testSpec name="Login test" description="Test the login procedure"> &config; <steps> <invoke stepid="get Login Page" url="login.php" /> <clickbutton name="login" stepid="Click"> <index value="0" /> </clickbutton> <exportProperty name="var" value="toto"/> </steps> <steps> <invoke stepid="get Login Page" url="login.php" /> <clickbutton name="login" stepid="Click"> <index value="0" /> </clickbutton> </steps> </testSpec> <echo message="${var}"></echo> </target> doesn't work. Is it a bug?

2) How could I retrieve the cookie value? Could I use storeCookie or storeregex?

Regards

Luca Scheuring a écrit :

hi sebastien

once you've extracted the session id (e.g. with storeregex), you can make this dynamic property available outside the testSpec-tag by exporting it with the extension step <exportproperty> (see http://webtest-community.canoo.com/wiki/space/ExportProperty).

I had the case where I needed access to a property file created in a seperate ant project file that was called from the ant file where I needed the property. since ant properties are not inherited "upwards", I had to store this property to disk (in a property file) using the optional ant task <propertyfile>. maybe this could be done more elegant...

--luca

-----Ursprüngliche Nachricht----- Von: webt@lists.canoo.com [mailto:webt@lists.canoo.com] Im Auftrag von Sébastien Mathy Gesendet: Donnerstag, 14. Oktober 2004 12:42 An: webt@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 : http://myurl?SESSIONID=${sessionid} But how could I store sessionid in a global property?

Thanks in advance

-- Sebastien Mathy Ingénieur de test __

KEREVAL Immeuble Le Gallium 80, avenue des Buttes de Coesmes 35700 RENNES - FRANCE http://www.kereval.com