wouldnt you just be better telling the remote machine to open a browser and
start a certain test?
or failing that, use more like a http  interface where each browser requests
its next command ( http://controller/my-id/next-request-please )

Paul

On Mon, Nov 30, 2009 at 2:48 PM, Tim Koopmans <[email protected]> wrote:

> Hi guys,
>
> Have been reviewing the efficiency of watirgrid's design of late in
> terms of performance. One of the issues I see is having to thread in
> user land, in order to execute parallel tests.
>
> To give you an idea, this is the code I would have to write at the moment:
> require 'rubygems'
> require 'watirgrid'
>
> browsers = Watir::Grid.new(:ring_server_port => 12358,
> :ring_server_host => '192.168.1.122', :loglevel => Logger::DEBUG)
> @browsers = browsers.start(:quantity => 2, :read_all => true)
>
> threads = []
> id = 0
> @browsers.each do |browser|
>  threads << Thread.new do
>    b = browser[2].new_browser
>    b.goto("http://www.google.com";)
>    b.text_field(:name, 'q').set("watirgrid")
>    b.button(:name, "btnI").click
>  end
> end
> threads.each {|thread| thread.join}
>
> Basically create a new thread for every browser in the tuplespace and
> then send it the commands. I don't believe this would be very
> efficient with say 1,000 threads (if going for a large load test of
> sorts).
>
> So IPC (via DRB etc) sorts out the requirement of having multiple
> processes (watirgrid providers) executing Ruby code, what I need is an
> efficient way to coordinate all this on a single watirgrid controller.
> Presently I'm using threads, but am open to ideas? Erlang? Anyone have
> experience in this area?
>
>
>
> Regards,
> Tim Koopmans
>
>
>
> On Mon, Nov 16, 2009 at 7:39 PM, Tim Koopmans <[email protected]> wrote:
> > Hi guys,
> >
> > In view of my last email about this I've decided to push on with druby
> > instead of http as I think the concepts surrounding distributed
> > computing are a good fit. This work has progressed since my last, you
> > can view the source here: http://github.com/90kts/watirgrid
> >
> > I haven't been able to contact any of the original authors of dwatir
> > or watirgrid so ploughing ahead under my own direction. I've only been
> > testing on a local machine with a windows VM, so the next steps are to
> > test this approach in anger.
> >
> > If you'd like to have a look at the source, or play with the gem feel
> > free (gemcutter is the primary source)
> >  gem install gemcutter
> >  gem tumble
> >  gem install watirgrid
> >
> > I've also included some instructions and detailed examples in the
> > source as RDoc.
> >
> > I'm heading for a railscamp this weekend so planning on tinkering with
> > watirgrid some more. As you can probably tell from my source, I'm a
> > tester-wannabe-developer so any general advice you have on
> > refactoring/structure/approach etc would be appreciated. I'll try and
> > round up some advice from railscamp.
> >
> >
> > Regards,
> > Tim Koopmans
> >
> >
> >
> > On Wed, Nov 4, 2009 at 4:21 PM, Tim Koopmans <[email protected]>
> wrote:
> >> Hi guys,
> >>
> >> I've recently been tinkering with distributed testing across a grid
> >> network with Watir. This work is currently hosted on GitHub at
> >> http://github.com/90kts/watirgrid
> >>
> >> I based my initial design off DWatir[1] which uses Rinda to implement
> >> a tuple space: a repository of tuples that can be accessed
> >> concurrently. I've tried unsuccessfully to contact the original author
> >> Dane Avilla, which looks like development stopped in 2007.
> >>
> >> Since starting the GitHub project I've noticed a similar solution, not
> >> using Rinda (UDP broadcast over druby protocol) but WebBrick (http
> >> protocol) instead. It's also called WatirGrid[2] (oops!) and the
> >> author looks to be Peter Houghton.
> >>
> >> My end state is to facilitate some form of load testing with watir,
> >> using many browsers concurrently. I plan to release it as a separate
> >> gem. My preference so far is to continue with the druby protocol.
> >>
> >> Questions to you are do you have any preference on choice of protocol
> >> (druby vs. http) and does anyone know the original authors so that I
> >> might get in contact with them?
> >>
> >> [1] http://dwatir.rubyforge.org/
> >> [2] http://www.ohloh.net/p/watirgrid
> >>
> >> Regards,
> >> Tim Koopmans
> >>
> >
> _______________________________________________
> Wtr-development mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-development
>
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to