Upload
mustafa-topcuogullari
View
36
Download
0
Embed Size (px)
Citation preview
SAHI Open Source Automation Tool
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.
SAHI runs as proxy server
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
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
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.
Download And Installation• Download SAHI OS from https://sahipro.com/sahi-open-source/
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>\userdata\bin and run
start_dashboard.sh
Recording on SAHI
Start Coding on SAHI
SAHI supports JS
• SAHI scripts are developed by JavaScripts. So JavaScripts can be used with SAHI scripts to prepare more powerful scenarios.
SAHI APIs Documentationhttps://sahipro.com/docs/sahi-apis/index.html
Let’s run our tests
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
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
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
Thanks !