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 run the same scenario, but using webdriver, the 
performance went decrease by alot.

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

watir:
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, the 
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)?
 

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to