WATIR Automated testing that doesn’t hurt
Who am I • Am a Watir contributor. • Have been using Watir since 2005. • Used it in projects, built frameworks around it as well extended it. • Contributions – Ported FireWatir to JRuby. – Wrote the Flash Extension for Watir – Project owner for ChromeWatir. – Project owner for Schnell. – Active member of Watir dev community and mailing list.
What is Watir • A browser driver. Can be used for testing web based applications. • Started as a library to teach testers to write ruby code. • Grew to be an IE implementation by Bret Pettichord. • Now supports IE, Firefox, Safari, Google Chrome and Opera. As well headless browser support using HtmlUnit through Celerity and Schnell. • Current release is 1.6.2. Can be found in http://wtr.rubyforge.org
Watir is cool because
Watir is cool because • It is written in Ruby and open source. • It has standardized interface across browsers. • The API and implementation is clean, intuitive and simple. • Supports major browsers. And fast headless browser support through Celerity and Schnell. • Good locator support • Easily extensible. • Active community (Watir wiki, mailing list and irc). Agile principles like refactoring, continuous integration and short releases strictly followed. • Has corporate support (www.watircraft.com) .
Watir can be better because • Firefox implementation using JSSH is really crummy. Discussions are going on to move to XPCOM • The standardization across implementations is still going on. FireWatir work is almost complete. The details about the other implementations is yet to be known. • SafariWatir and ChromeWatir are still not inside Watir mainline code base. • OperaWatir is still not open sourced.
Frameworks using Watir • Frameworks built using Watir as core – Taza – Now called WatirCraft – Rasta - a FIT influenced keyword driven framework – Watirloo - Semantic Page Objects Modelling – Excel and Wiki driven frameworks – More frameworks are out there • If you have built any cool frameworks or DSLs like Domain Driven or Fluent Interface, let me know. We can try it with Watir • For more info on frameworks, please see Watir wiki.
Watir Architecture
IE COM
FF JSSH
Apple Events
V8 Debugger
Dragonfly
WATIR API
Component 1
Component 2
Component 3
Test Script
Component 4
Your awesome framework
References • Watir website http://wtr.rubyforge.org • Watir Wiki http://wiki.openqa.org/display/WTR/Project+Home • ChromeWatir website http://code.google.com/p/chrome-watir • My blog http://developer-in-test.blogspot.com
Finally…
Thank you for your patience Lets see some code…