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
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.
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 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.