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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ralf Müller
Sent: Mittwoch, 15. März 2006 15:00
To: [email protected]
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
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to