Saturday, February 28, 2009

Chapter 32: ChromeWatir Unit Testing

ChromeWatir Unit Testing based on GoogleCode code

  1. Talked to Sai and he said the unit tests come with the ChromeWatir installation, so I am going to install it and see. He also said that "Running them together may have some problem. So need to run them separate. This is till we move to Chrome AutomationProxy."
  2. Tried to print the information on openqa and could not do it. Solve it by cutting and pasting. (3/3/2009: Update: Tried today and it worked/"closed")
  3. Tried installing the gem as told in installation wiki page and got this: $ gem install chrome-watir--1.0.0.gem
    ERROR: could not find gem chrome-watir--1.0.0.gem locally or in a repository (3/3/2009: Still an issue)
  4. Could not do a remote gem install so I downloaded the gem locally and did the following: $ gem install chrome_watir-1.5.0.gem --local
    Successfully installed chrome_watir-1.5.0
    1 gem installed
    Installing ri documentation for chrome_watir-1.5.0...
    Installing RDoc documentation for chrome_watir-1.5.0...
  5. So I tried this: svn checkout http://chrome-watir.googlecode.com/svn/trunk/ chrome-watir-read-only and I successfully downloaded the source. Output in this pastie.
  6. Ran the 14 tests separately after playing with run_tests.rb initiailly. Most had errors and/or failures.
  7. Tried a couple tests and they still had issues. Here is a common pair of errors: 1) Error: est_click_image(ImageTest):
    ChromeWatir::
    Exceptions::TimeOutException: Navigation timed out.
    ./../lib/chrome_watir/container.rb:329:in `wait_for_page_to_load'
    ./../lib/chrome_watir/browser.rb:13:in `goto'
    ./setup.rb:13:in `start_browser'
    test_image.rb:6:in `setup'
    2)
    Error: est_click_image(ImageTest):
    NoMethodError: undefined method `close' for nil:NilClass
    test_image.rb:9:in `teardown'

No comments:

Post a Comment