5 messages in com.canoo.lists.webtestRe: [Webtest] Re: <property file> -- ...| From | Sent On | Attachments |
|---|---|---|
| Ralf Müller | 15 Mar 2006 06:00 | |
| Dierk Koenig | 15 Mar 2006 06:17 | |
| Ralf Müller | 15 Mar 2006 06:23 | |
| Dierk Koenig | 15 Mar 2006 06:43 | |
| Daniel Brenner | 15 Mar 2006 07:27 |
| Subject: | Re: [Webtest] Re: <property file> -- there must be a solution...![]() |
|---|---|
| From: | Daniel Brenner (dani...@uni-dortmund.de) |
| Date: | 03/15/2006 07:27:45 AM |
| List: | com.canoo.lists.webtest |
Hi!,
this works fine. I also recieved this code via this mailing list, thanks again!
<repeat count=${items}> <scriptStep language="groovy" description="..."> def count = step.webtestProperties.count; step.webtestProperties.checkMe = step.project.properties['item.'+count] </repeat>
<!-- example -->
<verifytext text="'#{checkMe}" />
Daniel
Ralf Müller schrieb:
can you help me with the groovy step?
Ralf
Dierk Koenig wrote:
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: webt...@lists.canoo.com [mailto:webt...@lists.canoo.com]On Behalf Of Ralf Müller Sent: Mittwoch, 15. März 2006 15:00 To: webt...@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 WebT...@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________ WebTest mailing list WebT...@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest




