2. What is SAHI?
“Sahi OS” is an open source automation and
testing tool for web applications, with the
facility to record and playback scripts.
Developed in Java and JavaScript, this tool
uses simple JavaScript to execute events on
the browser.
4. Advantages of SAHI OS -1
• Using SAHI isn’t going to cost you much as it saves both your time and
money
• SAHI is an open source tool, so it is available to everyone easily
• SAHI runs on all the browsers
• SAHI scripts are fast to create and easy to maintain
• SAHI has powerful recorder which works on across browsers
• SAHI has powerful object spy
• SAHI supports Apache Ant
5. Advantages of SAHI OS -2
• SAHI Suites can run in multiple threads thus reducing the test
execution time
• No wait statements required even for AJAX and page loads
• External Proxy, HTTP and HTTPS support
• Support to read and write on Database (MySQL, MSSQL or Oracle),
Excel and CSV file
• Logging/reports
• One can easily introduce SAHI to manual testers
• Intuitive and simple APIs
6. Advantages of SAHI OS -3
One significant point is that Sahi gives the visible text a higher priority
than other code related properties like css style.
This helps in two ways;
• Writing and maintaining test scripts become very easy. What you see
is what you script.
• It validates what a user sees and not what a developer coded.
8. Run SAHI OS
• On Windows you can use shortcut which is created by SAHI while
installation process.
• On linux and Mac you need to go to <SAHI>userdatabin and run
start_dashboard.sh
14. Running Tests on command line & terminal
• First need to up sahi server without its own dashboard.
./start_sahi.sh or ./start_sahi.bat
• On OS or Linux
./testrunner.sh BBS/bbs.sah http://www.ebay.com/ firefox
• On Windows
./testrunner.bat BBS/bbs.sah http://www.ebay.com/ firefox
15. Multi Thread Testing
• No need to install any other 3rd party program to run parallel tests.
• Just create test.suite file which includes our .sah files.
• And run
./testrunner.sh BBS/bbs.suite http://www.ebay.com/ firefox
16. Headless Browsers and SAHI
• Sahi supports PhantomJS and X11 to run scripts via headless
browsers.
• First need to up sahi server without its own dashboard.
./start_sahi.sh
• Then
./testrunner.sh BBS/bbs.sah http://www.ebay.com/ phantomjs