135: Test Automation Using Sahi with Narayan Raman
with Narayan Raman
Founder
About this episode
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.
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’s Recorder, and being able to work more closely with the browser, helped make the testing process faster. Record and Playback records image in Javascript. There’s also a Java Recorder
- Sahi vs Selenium (both came out around the same time)
● Premises
○ “ 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.
● Operations
○ Selenium uses XPath, CSS Selectors, Waits, etc
○ Sahi handles a lot of complexity internally
■ enters Javascript into web page
● 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
○ Screenshots - 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!
Keep listening
Related episodes

Automation Testing Podcast · Ep. 609
Why Your AI Tests Pass When Your Features Fail with Donovan Brady
with Donovan Brady
Why Your AI Tests Pass When Your Features Fail? Donovan Brady of Leapwork shows how to make
Oct 27

Automation Testing Podcast · Ep. 608
Scary Test Automation POCs Made Easy: Halloween Special With Paul Grossman
with Paul Grossman
Running a proof of concept on test automation tools can feel like a horror movie. Vendors promise
Oct 20

Automation Testing Podcast · Ep. 607
Locust and Azure Load Testing: Create and Debug Load Tests with AI with Lars Holmberg and Abhinav Premsekhar
with Lars Holmberg and Abhinav Premsekhar
Performance testing has never been easier to start, or more important to get right. As teams ship
Oct 6

Automation Testing Podcast · Ep. 606
AI Agents Passed the Tests. Real Devices Didn’t. with Nick Metcalfe
with Nick Metcalfe
Cloud device farms make it easy to get started with real device testing. But what happens when
Sep 29