[Webtest] Using a property for a repeat count

Sean Flynn webtest@lists.canoo.com
Wed, 22 Oct 2003 17:03:38 +0000


When I execute the following script I get a java.lang.NumberFormatException: 
For input string: "#{ordersToSchedule} error. I have checked that the 
property value is correct. I need to be able to vary the number of 
iterations based upon data I extract from the page. Can I do this with 
WebTest?

<verifytitle stepid="Verify we are at the home page"
	text="${home.title}"  />
<storeregex
	stepid="Look for the # of orders to schedule"
	text="\t&lt;b&gt;\b([0-9]*).*"
	group="1"
	property="ordersToSchedule" />
<repeat count="#{ordersToSchedule}">
	<verifytext stepid="Look for # of orders"
		text="#{ordersToSchedule}" />
</repeat>

_________________________________________________________________
Add MSN 8 Internet Software to your current Internet access and enjoy 
patented spam control and more.  Get two months FREE!     
http://join.msn.com/?page=dept/byoa