Monday, 19 August 2013

for loop going beyond the compare limit

for loop going beyond the compare limit

This feels so stupid but what is wrong with this code? My for loop runs
till 55
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def holder = groovyUtils.getXmlHolder("StepName#ResponseAsXml")
def cnt = holder["count(//Results/ResultSet/Row)"]
log.info "Row count is: " + cnt
for(int i = 1; i<=cnt; i++){
x = x + 1
}
log.info "Loop ran for: " + x
The output is as below:
Mon Aug 19 12:38:04 ADT 2013:INFO:Row count is: 7
Mon Aug 19 12:38:04 ADT 2013:INFO:Loop ran for: 56

No comments:

Post a Comment