Blog

Latest Updates. News. Insights. Ideas.

February 2010 - Sahi Pro

ZK testing with Sahi

Posted by | Sahi, ZK, ZKOSS | No Comments

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.

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

Posted by | Uncategorized | 2 Comments

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

Use fully-loaded Sahi Pro FREE for a month. Download Now Request a Demo