[Webtest] Re: Data driven tests

Jason Kissinger webtest@lists.canoo.com
Fri, 23 Jul 2004 09:59:41 -0500


I've also started working on a csv loop for webtest similar to the
foreach task from ant-contrib.  My implementation adds a csvData task
similar to what you are proposing.  I should have this ready to share
early next week if anyone is interested.

<steps>
  <csvData file="data/reports.csv" param="csv">
    <invoke stepid="1.0 get reports page"
        url="path/to/reports.jsp"
        username="${csv.column1}"
        password="${csv.column2}"/>
    <setselectfield stepid="1.1 select report type: ${csv.column3}"
        name="rptType"
        text="${csv.column3}"/>
    <setinputfield stepid="1.2 set date: ${csv.column4}"
        name="effDate"
        text="${csv.column4}"/>
    <clickbutton stepid="1.3 submit report request"
        label="Generate Report"/>
    <verifytext stepid="2.0 verify report result: ${csv.column5}"
        text="${csv.column5}"
        regex="true"/>
  </csvData>
</steps>