[Webtest] Repeat property expansion question
Dierk Koenig
webtest@lists.canoo.com
Wed, 17 Dec 2003 12:10:16 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_00D2_01C3C496.BB952C80
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi,
The problem here ist that the ${} property is evaluated by ant before
webtest has a chance to see it.
#{} is evaluated by webtest.
Making the usage below possible through an ant task would be fairly tricky.
cheers
Mittie
-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of David.Howard@cambista.net
Sent: Mittwoch, 17. Dezember 2003 11:08
To: webtest@lists.canoo.com
Subject: [Webtest] Repeat property expansion question
When creating a loop it would be very useful to be able to have the loop
count loaded from a property file, and then have each of the values used
within the loop also loaded from properties. Thus a property file might
contain:
test.loopCount=4
test.loopValue.0=A
test.loopValue.1=B
test.loopValue.2=C
test.loopValue.3=D
To achieve this we seem to need an ant expression of the style
"${test.loopValue#{count}}" to evaluate correctly.
Is there a way of doing this?
___________
Cambista Technologies... www.Cambista.net
David Howard, Senior Technical Consultant.
------=_NextPart_000_00D2_01C3C496.BB952C80
Content-Type: text/html;
charset="us-ascii"
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=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D397455410-17122003><FONT face=3DArial color=3D#0000ff =
size=3D2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=3D397455410-17122003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D397455410-17122003><FONT face=3DArial color=3D#0000ff =
size=3D2>The=20
problem here ist that the ${} property is evaluated by ant before =
webtest has a=20
chance to see it.</FONT></SPAN></DIV>
<DIV><SPAN class=3D397455410-17122003><FONT face=3DArial color=3D#0000ff =
size=3D2>#{} is=20
evaluated by webtest. </FONT></SPAN></DIV>
<DIV><SPAN class=3D397455410-17122003><FONT face=3DArial color=3D#0000ff =
size=3D2>Making=20
the usage below possible through an ant task would be fairly=20
tricky.</FONT></SPAN></DIV>
<DIV><SPAN class=3D397455410-17122003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D397455410-17122003><FONT face=3DArial color=3D#0000ff =
size=3D2>cheers</FONT></SPAN></DIV>
<DIV><SPAN class=3D397455410-17122003><FONT face=3DArial color=3D#0000ff =
size=3D2>Mittie</FONT></SPAN></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B>=20
webtest-admin@lists.canoo.com =
[mailto:webtest-admin@lists.canoo.com]<B>On=20
Behalf Of </B>David.Howard@cambista.net<BR><B>Sent:</B> Mittwoch, 17. =
Dezember=20
2003 11:08<BR><B>To:</B> webtest@lists.canoo.com<BR><B>Subject:</B> =
[Webtest]=20
Repeat property expansion question<BR><BR></FONT></DIV><BR><FONT=20
face=3Dsans-serif size=3D2>When creating a loop it would be very =
useful to be able=20
to have the loop count loaded from a property file, and then have each =
of the=20
values used within the loop also loaded from properties. Thus a =
property file=20
might contain:</FONT><FONT face=3D"Times New Roman" size=3D3> =
</FONT><FONT=20
face=3Dsans-serif size=3D2><BR><BR>test.loopCount=3D4</FONT><FONT=20
face=3D"Times New Roman" size=3D3> </FONT><FONT face=3Dsans-serif=20
size=3D2><BR>test.loopValue.0=3DA</FONT><FONT face=3D"Times New Roman" =
size=3D3>=20
</FONT><FONT face=3Dsans-serif =
size=3D2><BR>test.loopValue.1=3DB</FONT><FONT=20
face=3D"Times New Roman" size=3D3> </FONT><FONT face=3Dsans-serif=20
size=3D2><BR>test.loopValue.2=3DC</FONT><FONT face=3D"Times New Roman" =
size=3D3>=20
</FONT><FONT face=3Dsans-serif =
size=3D2><BR>test.loopValue.3=3DD</FONT><FONT=20
face=3D"Times New Roman" size=3D3> </FONT><FONT face=3Dsans-serif =
size=3D2><BR><BR>To=20
achieve this we seem to need an ant expression of the style=20
"${test.loopValue#{count}}" to evaluate correctly.</FONT><FONT=20
face=3D"Times New Roman" size=3D3> </FONT><FONT face=3Dsans-serif =
size=3D2><BR>Is=20
there a way of doing this?</FONT><FONT face=3D"Times New Roman" =
size=3D3>=20
</FONT><BR><BR><FONT face=3Dsans-serif =
size=3D2>___________<BR>Cambista=20
Technologies... www.Cambista.net<BR>David Howard, Senior Technical=20
Consultant.<BR></BLOCKQUOTE></FONT></BODY></HTML>
------=_NextPart_000_00D2_01C3C496.BB952C80--