DataDriven from CSV instead of Excel

"Racic Michel (KSPF 821)" <michel.racic-zAU8bwGZFkSHCS/oddDOigC/[email protected]>
Newsgroups gmane.comp.web.canoo.webtest
Message-ID <05581C27C4BCEA46AD60851458D34EAA07921833@chsa1024.share.beluni.net>
Hi all

As Excel has it's limitations on the number of rows and colls, we need
an alternate way and a google lookup didn't light up the situation.
I found some message back from 2004 on this list where Jason Kissinger
wrote that he was implementing this and that it works:
"<csvFile file=3D"data.csv" param=3D"foo">
   <echo>Currently working on row ${foo.rowNum}</echo>
   <echo>  first column:  ${foo.column1}</echo>
   <echo>  second column:  ${foo.column2}</echo>
   <echo/>
</csvFile>
"
But I didn't see any other evidence of this or the code behind.

Is there something already existing in webtest or someone already
implemented such a plugin that he would share?

I just made some tests and it seems that it wouldn't be hard to
implement:
<groovy description="csv test" >
	new File("tests/test.csv").splitEachLine(",") {fields ->
		step.setWebtestProperty('field1', fields[0])
	}
</groovy> 
<echo message="test #{field1}" />

But I don't know exactly how to mix xml and groovy steps or better said
execute a group of steps for every loop with the data from the actual
line.

Does someone has a hint on this?

Best regards

Michel


> Michel Racic
> CREDIT SUISSE AG
> TS CH (Testing Services Switzerland)
> KSPF 821
> Tel: +41 44 333 92 01
> mailto:michel.racic-zAU8bwGZFkSHCS/oddDOigC/[email protected]
> www.credit-suisse.com
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.