Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Nested Dynamic Test tag's

2008-04-03
2013-04-25
  • I would like to do multiple test from a set of results setup in the Setup tag.

    Is this possible in anyway? Below is an example of a way to do it.

    IE

    <sqlunit>
      <connection connection-id="1"/>
      <setup>
       <set name="${mylist}">
         <sql><stmt>my driving values</stmt><sql>
         <resul><resultset><rows><col id=1/></rows></resultset></result>
       </set>
      <foreach valuename="${mydata}" drivingdata="${mylist}" index="${idx}">
        <test name="My Test${idx}">
          <sql><stmt>select something from table where id='${mydata}'</stmt></sql>
          <result>some tests</result>
        </test>
      </foreach>
    <sqlunit>

    Cheers

    Steve