Additionally,
You should start to look at WET , the extension to the watir project ...
It actually has a syntax for you being able to define your test data
in an excel spreadsheet ( for easy modification ) ... and then call it
directly from your script.
There is a merger in the works between the projects ... No information
yet on when, but ... You could take a look at that ... it might be an
easier way to maintain the information you need for testing.
j.
On 10/19/05, Mike Tierney <[EMAIL PROTECTED]> wrote:
> Thanks to all. I used this one below (works great) but I'll check out the
> other solutions when I have time. In about 2002 I was sick of using Rational
> Robot datapools, had a lot of boring, repititious stuff to add over & over
> via Robot in a few screens, and found something similar to this whole concept
> in a Rational group contributed by Carl Nagle. I think it was the first yahoo
> group, not the one where you have two-tiered input files .... ok I'm off
> topic. The point is a little test automation can turn a horribly boring
> testing task into something reasonably good & productive.
> Now watir is really slick- can't wait for the next cool thing I can do with
> it. Also belated thanks Carl if you are out there.
> Mike Tierney
> ####
>
> Try this:
>
> dataArray= Array.new
> n = 0
> File.new("data.csv").each_line do |line|
> line.chomp!
> dataArray[n] = line.split(',')
> n += 1
> end
>
> i=0
> while(i < dataArray.length)
> # go to address query start
>
> puts "First: #{dataArray[i][0]}"
> puts "Second: #{dataArray[i][1]}"
> puts "Third: #{dataArray[i][2]}"
>
> sleep 2
>
> i = i + 1
> sleep 2
>
> end
>
>
>
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
--
"http://ruby-lang.org -- do you ruby?"
Jeff Wood
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general