Hi,

I have posted this in the watir google groups and I have been recommended
to ask this question directly to this email group.

I have started to point my cucumber/watir-webdriver test suites on our
remote grid (hosted on another server, in a different physical location)
and the performance is quite dreadful compared to a local grid (ie i'm
executing my cucumber scripts on the same machine as the grid). The
performance went from 8 minutes to over 40 minutes (both runs our script in
parallel)! I did a bit of digging and it seems that the reason why it's so
slow is that there is a significant delay when i'm filling out my webforms.
Oddly enough, when i converted the scenario to webdriver, the performance
decrease about 3 to 4 times.

Here are the two sample scripts I'm using to compare (both doing a simple
google search) with a rather "complex" timing system

*watir:*

require 'rubygems'
require 'watir-webdriver'
browser = Watir::Browser.new(:remote, :url => remote_grid_url)
browser.goto "www.google.com"
now = Time.now.to_f
browser.text_field(:name => "q").set "We the People"
endd = Time.now.to_f
browser.button(:name => "btnG").click

delta =  endd - now
browser.close

puts "Took : " + delta.to_s


*Selenium-webdriver:*
*
*

require 'rubygems'
require 'selenium-webdriver'
browser = Selenium::WebDriver.for(:remote, :url => remote_grid_url)
browser.get "http://www.google.com";
now = Time.now.to_f
browser.find_element(:name => "q").send_keys "We the People"
endd = Time.now.to_f
browser.find_element(:name => "btnG").click
delta =  endd - now
puts "Took : " + delta.to_s


As you can see both scripts capture the time it takes to find the element
and populate it. I ran both scripts seperately, and on average, webdriver
takes 1 second to find and populate, and watir takes 3 seconds, which is 3x
more!

Is there a special setting i need on the grid to make it faster or do i
need to optimize my locators (ie find the div, then the child element)?

Thanks

Thien-An watir slow performance on a remote selenium grid2
_______________________________________________
Wtr-development mailing list
Wtr-development@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to