I've been trying to use a repeat step to check format in several tables
(ie, get the table with xpath, then parse multiple cells).  I ran into a
problem whenever I had more steps inside the repeat step than the number
of iterations of the repeat loop.  Originally I figured it was just xml
syntax, so I created a couple very simple test cases and had the same
problem.  Basically if you have the repeat step iterate n times, if
there are n+1 or greater number of steps inside the loop, it will insert
an extra unexecuted step for each extra step.  I can make a workaround
by just throwing all my steps in a <group> tag, but that's clumsy.  It
doesn't seem to be documented anywhere and I was curious if I'm missing
a solution.
 
For example:

            <repeat count="1">
               <verifyText text="td" />
               <verifyText text="tr" />
               <echo>#{count}</echo>
            </repeat>


Returned:
            <step>
                <parameter name="count" value="1"/>
                <parameter name="taskName" value="repeat"/>
                <result>
                    <completed duration="10"/>
                </result>
                <step>
                    <parameter name="description" value="Iteration 0"/>
                    <parameter name="taskName" value="iteration
wrapper"/>
                    <result>
                        <completed duration="0"/>
                    </result>
                    <step>
                        <parameter name="taskName" value="verifyText"/>
                        <parameter name="text" value="td"/>
                        <result>
                            <completed duration="0"/>
                        </result>
                    </step>
                    <step>
                        <parameter name="taskName" value="verifyText"/>
                        <parameter name="text" value="tr"/>
                        <result>
                            <completed duration="0"/>
                        </result>
                    </step>
                    <step>
                        <parameter name="nested text" value="0"/>
                        <parameter name="taskName" value="echo"/>
                        <result>
                            <completed duration="0"/>
                        </result>
                    </step>
                </step>
                <step>
                    <parameter name="taskName" value="verifyText"/>
                    <parameter name="text" value="tr"/>
                    <result>
                        <notexecuted duration="0"/>
                    </result>
                </step>
                <step>
                    <parameter name="nested text" value="#{count}"/>
                    <parameter name="taskName" value="echo"/>
                    <result>
                        <notexecuted duration="0"/>
                    </result>
                </step>
            </step>

It doesn't interrupt the test or cause it to fail, but it's still rather
annoying.

Thanks,

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

Reply via email to