Automation Testing

Article · 4 min read

Sahi for Web Application Automation

I often get questions about which tool is better for web application automation. The answer is always that it depends […]

Joe Colantonio

By Joe Colantonio

Founder, TestGuild · 17 January 2017 at 12:50 PM · Updated 05 January 2025 at 1:56 PM

Sahi for Web Application Automation

I often get questions about which tool is better for web application automation. The answer is always that it depends on your situation.

I recommend looking at what already exists before developing something new. (Check out my article Six Open Source Test Tools You Need to Know.)

I do mention Sahi in that post. But after interviewing Narayan Raman, Sahi’s creator, I decided to offer a more in-depth look.

What is Sahi?

The first thing you need to know is that Sahi comes in two flavors: open source and a pro version. Sahi Pro is the enterprise version of the open-source project. It includes lots of features coveted by larger organizations.

For example, compared to the open-source version the pro version has better:

  • Parallel Testing
  • Reporting

Parallel Testing Differences

With Sahi Open Source, you can run your test in parallel on a single machine. But what if you need to do something more complicated? Let’s say you have 1,000 scripts and you want to execute 25 of them in parallel?

For that type of functionality you’d want to use Sahi Pro. The pro version takes care of the distribution, execution and consolidation of reports automatically. With the open-source version these would all be manual activities.

Better Reporting in Sahi Pro

Another benefit of the pro version is reporting.

There are lots of just HTML files in Sahi Open Source that you can use for reporting. Creating reports, however is a manual process.

In Sahi Pro, the result files are more configurable and the data is also stored in the database. Having a database gives you the ability to access metrics and graphs of your test runs. The historic view also shows how your automation suite is progressing.

Why was Sahi Created?

In 2005, Narayan was working at ThoughtWorks.  Although they were trying to do lots of things in Agile, there was a problem. They noticed that while development was happening at a much more rapid pace, the testers weren’t able to keep up. They realized that to be more agile they needed more light weight test tools. So they decided to ditch their clunky vendor test tools for something easier to use.

Narayan had a background in proxies and JavaScript and decided to create his own tool. His main goal was to make it easy for testers to record and play back tests. Thus Sahi was born.

What’s the Difference between Selenium and Sahi?

The development of Selenium was going on at ThoughtWorks around the same time, but Sahi had a different focus; it was created with testers in mind, which is why Narayan made it as simple as possible. Many testers are not developers, which is one of the main reasons that lots of Selenium projects fail.

How does Sahi Work?

Sahi uses a small proxy server that runs on your machine. All the browser traffic goes through this proxy and as a result, Sahi is able to inject JavaScript onto the web page. That JavaScript allows you to do all the automation.

This is similar to Selenium RC, except that Sahi doesn’t rely on technologies like Xpath or CSS selectors. Instead, a tester doesn’t need to know much about an application.  Since the tool injects JavaScript into the web page, there’s more control. Any element that is of interest to automation will always have something to help identify it. A tester does not need to go back to a developer for nearly as often. The tool itself figures out which elements it needs to use to interact with a control.  This makes the recorded elements stable in the sense that they don’t change very often.

Sahi also takes care of waits. For example, it will wait for things like page loads or Ajax activities.

Isn’t Using a Recorder for Automation a Bad Thing?

Narayan doesn’t feel that a recorder is always a bad thing. The goal with Sahi is to make the recorder a useful utility. Since Sahi is for testers and not developers, it allows non-technical folks to create maintainable scripts. Thus, testers can focus on testing instead of programming. The tool itself attempts to take care of most of the complexities.

What Tool Should You Use for Test Automation?

What is important for the business? That’s the one question Narayan asks himself when choosing a tool for automation. Too often, folks select tools or languages as a way to boost their resumes. Don’t be one of those testers. Check out Sahi and see if it’s the right tool for your business.

Narayan Raman Sahi

About the author

Joe Colantonio

Joe Colantonio

Founder, TestGuild · Host, TestGuild Automation Podcast

Joe founded TestGuild in 2010 and has spent 27+ years in test automation. He hosts the longest-running automation-testing podcast (600+ episodes) and created Automation Guild, the premier online event for test automation engineers.

Joe Colantonio, founder of TestGuild

About the author

About Joe Colantonio

Joe Colantonio is the founder of TestGuild, an industry-leading platform for automation testing and software testing tools. With over 25 years of hands-on experience, he has worked with top enterprise companies, helped develop early test automation tools and frameworks, and runs the largest online automation testing conference, Automation Guild.

Joe is also the author of Automation Awesomeness: 260 Actionable Affirmations To Improve Your QA & Automation Testing Skills and the host of the TestGuild podcast, which he has released weekly since 2014, making it the longest-running podcast dedicated to automation testing. Over the years, he has interviewed top thought leaders in DevOps, AI-driven test automation, and software quality, shaping the conversation in the industry.

With a reach of over 400,000 across his YouTube channel, LinkedIn, email list, and other social channels, Joe’s insights impact thousands of testers and engineers worldwide.

He has worked with some of the top companies in software testing and automation, including Tricentis, Keysight, Applitools, and BrowserStack, as sponsors and partners, helping them connect with the right audience in the automation testing space.

Follow him on LinkedIn or check out more at his TestGuild profile .

Free PDF

Get 10 quick test automation tips

Actionable tips from top industry experts — skim them fast.