Test Automation Using Sahi with Narayan Raman
Are you looking for an automation tool that allow your testers and developers to create automated tests fast? In this episode we’ll Test Talk with the creator of Sahi, Narayan Raman. Discover why Sahi open-source and pro might be the right tool for your team.
About Narayan Raman
Second time entrepreneur. Creator of Sahi, an open source web testing tool. Founder of Tyto Software Pvt. Ltd. (previously Sahi Software), which helps companies reduce cost and effort incurred in testing web applications. Staunch Agile supporter, and pragmatic programmer.
Winner of Safari Books Online’s Super Coder Challenge for contribution to Sahi.
Quotes & Insights from this Test Talk
- Created Sahi After Attempt at Agile Needed something more lightweight and easier to use. Developers and browsers were moving too fast
- Very tester-focused, an effort to make it easier for a nyone to automate applications. Many testers are not programmers, and Sahi helps them understand the basics. Most testing code is procedural; you take steps and you verify results. Sahi helps to keep it simple! Organize functions into the right files Make sure you’re calling the right parameters
- This tool is good for both testers and developers. Developers write the application as it should function; the automation team and the tester team should be able to work with a working application, and be able to automate it; they should no thave anything extra done for that automation. If the tool requires more, there’s going to be pushback from developers. The end tester should know about only the actions he performs on the
- Example: “Recording a sequence for playback is considered a tricky task on most web applications,” but this was fairly successful. Helped testers to quickly automate the app and script it took tester through 30% or 40% of initial automation phase. After that, you should be refactoring the code into functions and have reusable libraries
- Sahi vs Selenium (both came out around the same time)
○ “ Selenium was built on the premise that the developer himself would also write every test for everything that he builds; he has full control over the application that he’s testing.”
○ In Sahi, the end tester does not need to know too much about the app. If there is something he needs to automate, he does not need to go back to the developer all the time.
○ Selenium uses XPath, CSS Selectors, Waits, etc
○ Sahi handles a lot of complexity internally
● Hooks into XMLHTTPRequestObject, and wait until AJAX activity
has subsided on the page before proceeding to execute a step
○ Eliminates need for implicit or explicit waits
■ “Any element of interest to automation will always have something by
which it can be identified, even if it doesn’t have an ID…Depending on the
kind of element, we have a sequence of attributes by which we try to
identify that element… the code automatically iterates to the frame and
finds the element.”
■ “XPath is a strict no-no in Sahi.”
■ Does not rely on structure of HTML page to ID elements
● Makes elements more stable
■ Sahi is similar to Selenium IDE, but it will work on any browser
● Recorder will carry over between browsers, as well
■ Finds most useful attribute value during recording phase, and stores that one only
■ Eventually, triggers will come from a continuous integration system
- Sahi Pro ( www.sahipro.com )
● Adds enterprise features to Sahi
● Better for bigger organizations with larger suites
○ Helps test automation team focus on the automation itself
○ Distribution across multiple machines
■ Test suite executed across all machines
■ Pull reports and generate one consolidated report
● Can be stored in a database
● Puts system reports in database
○ Reports are more varied and configurable
○ Historic overview available for test suite
■ Can analyze trends and patterns
○ Log reports
- When choosing tools or trying to automate, think what is important for the business, and not what is important for a resume review. What adds the most business value is what is going to take you higher in your organization, and also is going to help the business that you’re actually employed with.
Connect with Narayan Raman
May I Ask You For a Favor?
Thanks again for listening to the show. If it has helped you in any way, shape or form, please share it using the social media buttons you see on the page.
Additionally, reviews for the podcast on iTunes are extremely helpful and greatly appreciated! They do matter in the rankings of the show and I read each and every one of them.
Test Talks is sponsored by the fantastic folks at Sauce Labs. Try it for free today!