[Wtr-general] Data Driven Testing
jackei
jackeichan at gmail.com
Sun Feb 4 23:04:47 EST 2007
I've a easy way to do this.
some codes as following:
#~ First, use the parameters replace the data in your script, include the
input data and expect output data;
#~ 2nd, open and read a data file which is .csv format;
theDataFile=File.new(dataFilePath,"r")
#~ 3th, read the data from data file used by a loop e.g. while
while not theDataFile.eof? do
theDataFile.gets
#~ the 'dataset' is a array
dataSet=theDataFile.gets.split("\t")
end
#~ 4th, executing your script and auto input all data then auto verify the
expect output data.
On 2/5/07, mike <forum-watir-users at openqa.org> wrote:
>
> Does watir provide an easy method to utilize data tables (not excel
> spreadsheets)? Im building a script that hopefully will iterate through a
> list (500K+) of numbers and execute a web search on each of them, then
> verify the results of the search. The logic for validation is completed,
> but im having trouble loading the list.
>
> Any help is much appreciated!
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=6412&messageID=18131#18131
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
Please give me a reply if you recevied the mail. Thanks.
Best Regards
Jackei.Chan (Software Testing Consultant)
jackeichan at gmail.com
Chinese Blog: http://jackei.cnblogs.com/
English Blog: http://www.testingreflections.com/blog/3424
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070205/57994c83/attachment.html
More information about the Wtr-general
mailing list