[Webtest] <property file> -- there must be a solution...
Dierk Koenig
webtest@lists.canoo.com
Wed, 15 Mar 2006 15:17:51 +0100
Hi,
well, pb here is that Ant resolves its properties long before
runtime and therefor #{i} is not yet replaced with any number.
We have some solution in mind but until then you need a little
groovy step to do the resolution at runtime.
cheers
Mittie
> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Ralf Müller
> Sent: Mittwoch, 15. März 2006 15:00
> To: webtest@lists.canoo.com
> Subject: [Webtest] <property file> -- there must be a solution...
>
>
> Hi!
>
> I've the following Problem:
>
> I would like to read in some properties for a series of tests. My
> propterties file looks something like this:
>
> items=5
> item.0=a
> item.1=b
> item.2=c
> item.3=d
> item.4=e
>
> I read it in with <property file> and do have some ant properties as a
> result. And well - that's already my problem:
> When I try to read them via ${item.#{i}} in a <repeat>, the term doesn't
> evaluate as expected.
> Yes, I do know that this is because of the difference between ant and
> webtest properties... But what's the right way to do something like
> that? Any ideas?
>
> Best Regards,
> Ralf
>
> PS: here's the full code snippet:
>
> <repeat counterName="i" count="${items}">
> <storeProperty name="current.item" value="${item.#{i}}" />
> <!-- do something with #{current.item} -->
> </repeat>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest