[Webtest] No dynamic property in storeRegEx

Marcel Stör marcel@frightanic.com
Mon, 21 May 2007 14:40:53 +0200


Denis N. Antonioli wrote:
> Hi
> 
> On 21 mai 07, at 09:49, Marcel Stör wrote:
> 
>> If I remove propertyType="ant" or use propertyType="dynamic", <ech=
o 
>> message="${myMenuItemUrl}" /> will print ${myMenuItemUrl} instead of=
 
>> the real value. Why is that?
> 
> See <http://webtest.canoo.com/webtest/manual/properties.html>
> You need a hash '#' to access a dynamic property, like:
> <echo message="#{myMenuItemUrl}" />

*hitting my head* uurrgghh, right, sorry about that.

>> This wouldn't be such a big deal if I only had this one menu item to 
>> check, but - and this is my second question - I want to repeat the 
>> above for each menu item. Of course, in a somewhat dynamic maner... 
>> I'd like to define a collection of myMenuItemText (is part of my regex=
 
>> above) values and have the above repeated. How to go about that?
> 
> The repeat step <http://webtest.canoo.com/webtest/manual/repeat.html> 
> may be the simplest solution.

I did have a look at that before I sent the post (especially the XPath 
example), but I can't see how this would work with my requirements. The 
"input" for repeat would be an regex query that returns n hits; n 
myMenuItemUrl. Or I would have to create a collection of tokens (comma 
separated list, again driven by regex) and make use of antcontrib 
<foreach list="${tokens}"?

Regards,
Marcel

-- 
Marcel Stör, http://www.frightanic.com
Blog: http://frightanic.wordpress.com
Skype: marcelstoer