Post on 20-Jan-2015
description
Economical, Robust Web Automation using Sahi
V Narayan RamanTyto Software Pvt. Ltd.
Sahi• Automation tool for web app testing
• Mature open source tool started in 2005
• Easy to use, ideal for testers
• Works well with AJAX, Web 2.0
– No Xpaths, no waits
• Works well with Agile methodologies
– Version control, refactor, continuous integration
• Sahi script, Java and Ruby drivers
Real life problems
• Object Identification
– Need developer involvement for adding ids
– Xpaths – brittle, difficult to grasp, not cross browser
– css-selectors – better, but still complicated and not cross browser
• Waiting for AJAX, Page loads
– Hardcoded - slow
– Conditional – needs knowledge of the DOM and DOM events
Real life problems
• Knowledge and learning curve– Java, Junit, Eclipse, Ruby, Xpaths, Firebug, browser DOM, Frames/Iframes -
Really unrelated to web testing!
– Difficult to staff or ramp up teams
Sahi Differentiators• Recorder on all browsers
• Implicit waits, even for complex AJAX and page loads
• Excellent Object Spy and accessors which work across frames and iframes
• No special privileges required on browser
• HTTPS, 401/Windows/NTLM authentication, popup windows, modal
dialogs, File uploads
DEMO
Other features
• Interact with Java directly from Sahi Script
• Read/Write to files, databases, Excel sheets,
XML files
• Ruby/Java drivers and recorders
Sahi vs Selenium
• No XPaths or Waits• Recorder on all browsers• Identifies objects with dynamic ids• Can run multiple instances of browsers
simultaneously on single machine. (Even IE)
Sahi vs QTP
• Recorder on all browsers and OS• Can script in Sahi Script/Java/Ruby• Simultaneous playback• Grid like playback• Does not lock up mouse• Object identification is superior• Sahi does not support desktop applications
Tips for stable tests
• Rely on recorder only initially
• Find the smartest accessor
– No index based accessors if possible
– Use _near and _in
• Refactor and reuse code
– Minimize code duplication
– functions, variables, _include
• Use the Sahi Controller to your advantage
Sahi Pro
• Distribute tests across multiple machines (Grid)
• Automatically accept SSL certificates• Enhanced Controller: Easily record _in and
_near• Refactor scripts from the Controller• Log results to database as XML, HTML or SQL
Feature Road Map
• Flex support (in Sahi Pro)
• Android support
• C# driver
Sahi saves you Time and Money
• Recorder, Object Spy and APIs
– Reduce development time
• Smart accessors
– Stable tests save maintenance time
– Lesser dependence on developers to add ids everywhere
• In built parallel playback, HTML reports
– Saves time in maintenance and quick start
• Authoritative commercial support and training available
– Saves time in removing road blocks
Questions and Answers
http://sahi.co.in/http://sahi.co.in/forums
For enquiries on Sahi Pro, email us at support@sahi.co.in
Twitter: _sahiLinkedIn group: Sahi Web AutomationTyto Software Pvt. Ltd.http://www.tytosoftware.com