| Share

Tuesday, March 02, 2010

ThoughtWorks Studios' Twist 2.0 with Sahi

ThoughtWorks announces Twist 2.0 availability from 31st March 2010:
http://www.prnewswire.com/news-releases/thoughtworks-studios-new-twist-20-provides-collaborative-agile-test-management-85809582.html

Tyto Software has been collaborating with ThoughtWorks Studios to integrate Sahi with Twist and results will be visible in Twist 2.0.

"Twist 2.0 has added Sahi as an additional option for web testing. The main benefit of Sahi is that it abstracts out most difficulties that testers face while automating web applications. Its features include an excellent recorder, platform and browser independence, no XPaths, no waits and multi-threaded playback. In addition, it allows you to identify UI components within the application as you record test scenarios." Announcing Twist 2.0: Available for download on March 31

Wednesday, February 24, 2010

Sahi automating ZK 3.6 Sample Application - Demo video

Here is a brief video which shows how Sahi can be used to automate ZK based applications. Notice how Sahi uses neither XPaths nor explicit waits, and works with the same script on both Firefox and IE.

Sunday, February 14, 2010

ZK testing with Sahi

Joseph Neuhaus has written a detailed article on testing ZK applications with Sahi. The article explains how to run Sahi tests headless on a linux machine.

Excerpts from the well written, thorough article:

If you have attempted to create browser-based functional tests with Selenium, or load tests using Grinder, then you will marvel at the simplicity of Sahi.

The Problem
Testing ZK Web Applications can be a challenge with Selenium and Grinder because ZK dynamically generates element IDs, and these testing frameworks identify elements within the rendered Web Page using these IDs. Therefore, once a session has been recorded, it cannot be replayed because the element IDs will change the next time the Web Application is launched. To address this, ZK provides a hook so you can generate your own IDs. This is a great feature to be sure; however, now you're not testing the application that will be promoted into production. Also, keeping track of "special" test builds of your application increases work and complexity. To make matters worse, some testing frameworks, such as Selenium, require you to install browser plugins to create the recorded browser sessions used for playback. When browser updates occur, you can't upgrade until the plugins are updated too. More moving parts means more issues maintaining the Test Environment. There must be a better way, and there is. It's called Sahi.

The Solution
Sahi can record and playback sessions directly on your production ZK Web Application without having to use a custom ID generator. It requires no browser plugins to create recorded sessions to be used for playback. Sahi is pure Java, so it integrates nicely with ANT. The Sahi scripting language is simple and elegant, so there's no need to break out the XPATH documentation to get your tests running. You can even run your Sahi tests headless using Firefox in an X-Window virtual frame buffer on Linux. In headless mode you can run real browser-based tests on your continuous integration machines without having to be logged in. If you're testing on windows, you can run your tests on IE, Firefox, Chrome, Safari, and Opera. Despite some idiosyncrasies Sahi seems magical at times, but more importantly it makes testing productive - so productive it's almost fun!


The full article is available here: http://docs.zkoss.org/wiki/Making_ZK_Functional_Tests_With_Sahi

Joe Neuhaus has over twenty years of experience in software development, systems design, and technical management roles.

Wednesday, February 10, 2010

Narayan Raman wins Safari Books Online's Coder Challenge for Sahi



Narayan Raman from Tyto Software won Safari Books Online's Coder Challenge for his contribution to Sahi.

What followed was a day of good fun, interactions with the other winners, wine tasting at Kendell Jackson and Korbel wineries, a pleasant dinner and lots of discussions with Tim O'Reilly, O'Reilly Media, Paige Mazzoni, VP marketing, Safari Books Online, and CJ Rayhill, senior VP, product management and technology, Safari Books Online.

Narayan Raman and the other winners also won a three month subscription to Safari Books Online.



Narayan Raman, Ashley Aberneithy, Tim O'Reilly, Aral Balkan and Arturo Fernandez-Sanchez



CJ Rayhill, Narayan Raman, Ashley Aberneithy, Tim O'Reilly, Aral Balkan, Arturo Fernandez-Sanchez and Paige Mazzoni

Press release: http://www.businesswire.com/portal/site/home/permalink/?ndmViewId=news_view&newsId=20100202005735&newsLang=en

Thank you Safari Books Online for the award and the excellent hospitality.

More pictures on Flickr

Thursday, January 07, 2010

Sahi in "Nagios - The Practice Book: Open Source Monitoring in the Enterprise"

There is a fairly detailed section on monitoring web applications using Nagios and Sahi in Gerhard Lausser's new book (in German): "Nagios - The Practice Book: Open Source Monitoring in the Enterprise", ISBN: 978-3-8273-2800-7






Tuesday, January 05, 2010

Web automation does not need XPaths

Really.

Learn this web automation nursery rhyme today!

XPaths are evil,
XPaths are fickle,
Developers touch code,
And the testers are in a pickle!

Have you ever used XPaths and found that it needs non-trivial amount of effort in maintenance?

Especially testers, who do not have the time or energy to get XPaths right, stay away from XPaths. Use ids or names or any other attribute the web element provides.

Sahi, since it is aimed at testers rather than developers, does not encourage use of XPath, which means that you can use it if you want, but the controller will never show you XPaths.

So how does Sahi handle something like this?

My nameEdit
Your nameEdit
His nameEdit

Simple, Sahi uses the _in and _near APIs.

So to access the edit link of Your name, use

_link("Edit", _near(_cell("Your name")))

Like wise

_link("Edit", _near(_cell("My name")))
_link("Edit", _near(_cell("His name")))


Visit us again or subscribe to this blog for more tips on web automation ...

Friday, July 17, 2009

Sahi Nightly Release 2009-07-15

A new nightly build is available at https://sourceforge.net/projects/sahi/files/
This fixes a file upload issue and adds support for 401 Authentication and HTTPS Client Certificates.


* Features added
Support for 401 authentication. A dialog box is shown on the browser for authentication.
Support for HTTPS client certificates. Look at ssl.client.* settings in sahi.properties
_hidden(identifier) added
_byClassName(className, tagName [, domRelation]) added

* Bugfixes
checkbox onchange triggered for IE.
Content-Length removed from parts of MultiPartRequest