[Webtest] newbie needs help - nesting properties

Michael Knapp webtest@lists.canoo.com
Thu, 9 Oct 2003 19:12:47 -0700

Hi all - i'm new to both webtest and ant (as well as the dependency tools
and packages), so please bear with me.

I'm trying to use a <repeat> loop and refer to #(count) as part of a
property name, like so

<!-- these would actually be in a .props file, but the effect should be the
same -->
<property name="smoke.url.0" value="/pregnancy/"/>
<property name="smoke.title.0" value="Pregnancy"/>
<property name="smoke.url.1" value="/baby"/>	
<property name="smoke.title.1" value="Baby"/>	


<repeat count="2">
	<invoke stepid="Get page: ${smoke.title.#{count}}"
	<verifytitle stepid="verify title"
	   text="${smoke.title.#{count}}" />

It doesn't expand both variables, just the nested one (ie, on hte first
iteration, it expands #{count} to "0",
but doesn't expand the resultant ${smoke.title.0} to "Pregnancy".

Does anyone have a better idea of how i should go about acheiving the same
result?  i'm really trying to code OAOO....