Nested repeat blocks do not handle variables correctly
------------------------------------------------------

         Key: WT-239
         URL: http://webtest-community.canoo.com/jira/browse/WT-239
     Project: WebTest
        Type: Bug

    Versions: 2.1, future versions    
 Environment: Windows XP SP2, java 1.5.0_07, ant 1.6.5, build 1417 (and 
previous)
    Reporter: Craig Copeland


Nested repeat blocks do not handle variables correctly *after* the first 
complete run on the inner loop.  Most simply:
<repeat count="2">
  <repeat count="2" counterName="inner_loop">
    <antWrapper><echo message="outer: #{count}, inner: #{inner_loop}" 
/></antWrapper>
  </repeat>
</repeat>
generates:
     [echo] PASS #0
     [echo]   outer: 0, inner: 0
     [echo]   outer: 0, inner: 1
     [echo] PASS #1
     [echo]   outer: 0, inner: 1
     [echo]   outer: 0, inner: 1
Notice that the second pass through the inner loop reports the values of the 
properties set when you exited the inner loop on the first pass.

>From the maillist:
> Hi Craig,
> I think that it is solved in the latest build due to the better ant usage.
> Marc.
However, this does not seem to be the case.

To Reproduce, run the following test:
<?xml version="1.0"?>
<!DOCTYPE project SYSTEM "WebTest.dtd"[
]>
<project name="Testing 1.2.3" basedir="." default="main">
  <property name="webtest.home" location="C:\Documents and 
Settings\ccopeland\Desktop\canoo-webtest"/>
  <import file="${webtest.home}/lib/taskdef.xml"/>
  <target name="main">
    <webtest name="myTest">
      <steps>
        <repeat
          count="2">
          <antWrapper><echo message="PASS ##{count}"/></antWrapper>
          <repeat
            count="2"
            counterName="inner_loop">
            <antWrapper><echo message="  outer: #{count}, inner: 
#{inner_loop}"/></antWrapper>
          </repeat>
        </repeat>
      </steps>
    </webtest>
  </target>
</project>

Possible related opened bug:
http://webtest-community.canoo.com/jira/browse/WT-220

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

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

Reply via email to