[Webtest] [webtest][JIRA] Closed: (WT-239) Nested repeat blocks do not handle variables correctly

Marc Guillemot (JIRA) Marc Guillemot (JIRA)" <noreply@canoo.com
Wed, 13 Dec 2006 10:30:33 +0100 (CET)


     [ http://webtest-community.canoo.com/jira/browse/WT-239?page=all ]
     
Marc Guillemot closed WT-239:
-----------------------------

    Fix Version: future versions
     Resolution: Fixed

Should be fixed in build 1149 which contains a selftest inspired from the one provided here.

> 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: future versions
>  Environment: Windows XP SP2, java 1.5.0_07, ant 1.6.5, build 1417 (and previous)
>     Reporter: Craig Copeland
>      Fix For: future versions

>
> 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