AW: [Webtest] sessionid
Sébastien Mathy
webtest@lists.canoo.com
Thu, 14 Oct 2004 15:16:11 +0200
This is a multi-part message in MIME format.
--------------030005080709060102080202
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
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: webtest-admin@lists.canoo.com
>>[mailto:webtest-admin@lists.canoo.com] Im Auftrag von Sébastien 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 :
>>http://myurl?SESSIONID=${sessionid}
>>But how could I store sessionid in a global property?
>>
>>Thanks in advance
>>
>>--
>>Sebastien Mathy
>>
>>
>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>
>
--
Sebastien Mathy
Ingénieur de test
__
KEREVAL
Immeuble Le Gallium
80, avenue des Buttes de Coesmes
35700 RENNES - FRANCE
http://www.kereval.com
--------------030005080709060102080202
Content-Type: text/x-vcard; charset=utf-8;
name="sebastien.mathy.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="sebastien.mathy.vcf"
begin:vcard
fn;quoted-printable:S=C3=A9bastien Mathy
n;quoted-printable:Mathy;S=C3=A9bastien
email;internet:sebastien.mathy@kereval.com
x-mozilla-html:FALSE
version:2.1
end:vcard
--------------030005080709060102080202--