2 messages in com.canoo.lists.webtestRe: [Webtest] newbie needs help - nes...
FromSent OnAttachments
Michael Knapp09 Oct 2003 19:12 
Marc Guillemot09 Oct 2003 23:43 
Subject:Re: [Webtest] newbie needs help - nesting properties
From:Marc Guillemot (mgui@yahoo.fr)
Date:10/09/2003 11:43:27 PM
List:com.canoo.lists.webtest

Hi Michael,

afaik the ${...} variables are expanded by ant and the #{...} by webtest. I guess that in your case ant doesn't expand the variable because it's not valid for him (probably because it contains a "{"). No idea of an other way to
process.

Marc.

Michael Knapp wrote:

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}}" url="${smoke.url.#{count}}"/> <verifytitle stepid="verify title" text="${smoke.title.#{count}}" /> </repeat> ...

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....

Thanks mike