RE: Loops Data Driven Testing, Load Data from a plain text file.

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

As he is asking about plaintext files...
Here's an example to read from a csv:

<groovy description="csv test" > 
        new File("tests/test.csv").splitEachLine(",") {fields -> 
                step.setWebtestProperty('field1', fields[0]) 
        } 
</groovy> 
<echo message="test #{field1}" /> 

Put this in a loop and adapt it to your format.
Othjerwise if you first convert your plaintext inputfile to an excel you can use the datadriven step.

Best regards

Michel

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Murat
Sent: Friday, April 08, 2011 9:06 AM
To: [email protected]; Habbert, Michael (Key-Work)
Subject: Re: [Webtest] Loops Data Driven Testing, Load Data from a plain text file.

Hi,

I think the step is called dataDriven. :)

http://webtest.canoo.com/webtest/manual/dataDriven.html

Regards,
Murat



2011/4/8 Habbert, Michael (Key-Work) <[email protected]>:
> Hi Vu Quach,
>
>
>
> you can program something like a loop by using:
>
>
>
> http://webtest.canoo.com/webtest/manual/repeat.html
>
>
>
> and I think I read some notes about reading test-data from an Excel-File to
> use them inside a test.
>
>
>
> Greetings
>
>
>
> Michael Habbert
>
>
>
>
>
> Michael Habbert
> Key-Work Consulting GmbH | Kriegsstr. 100 | 76133 Karlsruhe | Germany |
> www.key-work.de
> Fon: +49-721-78203-269 | E-Mail: [email protected] | Fax:
> +49-721-78203-10
>
> Key-Work Consulting GmbH, Karlsruhe, HRB 108695, HRG Mannheim
> Geschäftsführer: Andreas Stappert, Tobin Wotring
>
> Von: [email protected] [mailto:[email protected]] Im
> Auftrag von Vu Quach
> Gesendet: Freitag, 8. April 2011 04:55
> An: [email protected]
> Betreff: [Webtest] Loops Data Driven Testing, Load Data from a plain text
> file.
>
>
>
> hi there,
> i`m a newbie to Canoo.
> - I wonder if there are some way to make Loops Data Driven through out the
> test?
> -  Can Canoo Webtest load data from a plain text file in to the TestCase?
>
> --
> Best Regards,
> Vu Quach
> Java Developer
> AXON ACTIVE VIETNAM
> www.axonactive.vn
> 10th Floor, Hai Au Building, 39B Truong Son, Ward 4, Tan Binh District, Ho
> Chi Minh City, Vietnam
> Telephone: +84 8 629 738 59,
> Fax: +84 8 381 134 89,
> Mobile: +84908 01 00 84
> 106°39'51"East / 10°48'32"North
> Email: [email protected]/nomatterhow21-/[email protected]
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
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.