1 / 19

Open Source Web Testing

Open Source Web Testing. Free You have the source Many people solving common problems. by Len Vaz – Moreover Technologies. Frameworks. Watir (Ruby) Selenium (Java) Watij (Java) HtmlUnit (Java) HttpUnit (Java) WET (C#). What to look for?. Documentation Active user groups

ora
Download Presentation

Open Source Web Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Open Source Web Testing Free You have the source Many people solving common problems by Len Vaz – Moreover Technologies

  2. Frameworks • Watir (Ruby) • Selenium (Java) • Watij (Java) • HtmlUnit (Java) • HttpUnit (Java) • WET (C#)

  3. What to look for? • Documentation • Active user groups • Browsers supported • Operating systems supported • Ease of use • Does it support what you are testing? • Logging, DB support, Reporting, VMWare • Look at existing test cases for other features

  4. Stuff to help - 1 • A good IDE • http://www.eclipse.org/downloads/ • http://www.aptana.com/ • IE Developer toolbar • http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en • Firebug • https://addons.mozilla.org/en-US/firefox/addon/1843

  5. Stuff to help - 2 • IRB – Interactive Ruby shell • Tab completion (.irbrc) • require ‘irb/completion’ • Persistent command history (.irbrc) • require ‘irb/ext/save-history’ • ARGV.concat [ "--readline", "--prompt-mode", "simple" ] • IRB.conf[:SAVE_HISTORY] = 100 • IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"

  6. Stuff to help - 3 • Turn off pop-up blockers • Have browser windows open to new windows • If you need UTF-8 support, add: • require 'win32ole' • WIN32OLE.codepage = WIN32OLE::CP_UTF8 • Make sure your data is utf8 encoded when saved • Problem dealing with frames – selenium??? • http://wiki.openqa.org/display/WTR/Frames • Use Ruby’s unit/test framework • http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html

  7. Documentation • Watir • http://wtr.rubyforge.org/rdoc/ (Watir API) • http://www.ruby-doc.org/core/ (Ruby) • http://www.ruby-doc.org/stdlib/ (Ruby) • http://groups.google.com/group/watir-general (User group) • http://rubyforge.org/mailman/listinfo/wtr-development (dev) • http://wiki.openqa.org/display/WTR/Project+Home • Selenium • http://seleniumhq.org/documentation/ • LinkedIn (user group) • http://clearspace.openqa.org/community/selenium (forum) • http://www.jroller.com/selenium/

  8. Selenium – Platform, Browser and Languages supported • Platforms • Windows, OS X, Linux, Solaris • Browsers • Firefox 2, 3; IE 7; Safari 2, 3; Opera 8, 9, Chrome • Languages • C#, Java, Perl, Python, PHP, Ruby

  9. Watir – Platform, Browser and Languages supported • Platforms • Windows, OS X, Linux • Browsers • Firefox 2, 3; IE 7; Safari 2, 3; Chrome • Language • Ruby

  10. Watir / Selenium Installation • Watir (http://wtr.rubyforge.org/install.html) • Install Ruby (http://rubyforge.org/frs/?group_id=167) • Install Watir (gem install watir) • Install jssh (http://wiki.openqa.org/download/attachments/13893658/jssh-20080708-WINNT.xpi) • Selenium • gem install selenium; gem install selenium-client (Ruby) • Install Java (http://www.java.com/en/download/manual.jsp) • Install Selenium (http://seleniumhq.org/download/) • Remote control & Selenium IDE

  11. Watir example • require ‘watir’ • Watir.options[:browser]='firefox‘ • ie, firefox, safari, chrome • browser = Watir::Browser.new • browser.goto ‘http://www.google.com’ • browser.text_field(:id, 'q').set 'automation‘ • browser.button(:name, 'btnG').click • puts browser.title • browser.close

  12. Selenium example • require ‘selenium/client’ • @browser = Selenium::Client::Driver.new("localhost", 4444, "*iexplore", "http://www.google.com", 10000); • iexplore, konqueror, firefox, mock, chrome, iehta, piiexplore, pifirefox, safari, opera, custom) • @browser.start_new_browser_session • @browser.open “/” • @browser.type “q”, “automation” • @browser.click “btnG”, :wait_for => :page • puts @browser.title • @browser.close_current_browser_session

  13. Selenium components • Selenium IDE • Selenium Core • Selenium Remote Control • Selenium Grid

  14. Selenium server

  15. IRB

  16. TestUnit in Eclipse

  17. Selenium IDE-1

  18. Selenium IDE-2

More Related