Welcome!

AJAX & REA Authors: John Funnell, Bob Little, Kevin Hoffman, Maureen O'Gara, Onkar Singh

Related Topics: AJAX & REA

AJAX & REA: Article

Why is AJAX Testing So Hard?

Selenium, a potential solution

Our Choice - Selenium
Selenium (open source) offers an alternative approach. It's implemented in JavaScript and Selenium tests run directly in the browser just like a real user. This approach lets Selenium support many browsers on many different platforms. This is the widest cross-browser support this author has seen to date.

Some Important Selenium features:

  • Selenium tests are defined as simple HTML tables called "selenese" that define a simple and complete cross-browser event model. Supports Actions, Accessors, and Assertions.
  • Ability to extend Selenium. The WaitForValue and WaitForCondition extensions in Selenium are an example. These commands are important in handling timing in designing AJAX tests.
  • Cross-browser, cross-platform support

Windows:
•   Internet Explorer 6.0 & 7.0
•   Firefox 0.8-2.0
•   Mozilla Suite 1.6+, 1.7+
•   Seamonkey 1.0
•   Opera 8 & 9

Mac OS X:
•   Safari 2.0.4+
•   Firefox 0.8-2.0
•   Camino 1.0a1
•   Mozilla Suite 1.6+, 1.7+
•   Seamonkey 1.0

Linux:
•   Firefox 0.8-2.0
•   Mozilla Suite 1.6+, 1.7+
•   Konqueror
•   Opera 8 & 9

A very active support community is extending Selenium. It includes many open source contributors but also commercial software companies like Google, Tibco, and SOASTA.

Jason Huggins (who invented Selenium and wrote Selenium Core) now works at Google and is part of a project to implement Selenium on Google's grid technology. See the link to the Google Test Automation Conference video featuring Jason and Jen Bevan for more details on what Google is doing. You'll be impressed.

The Tibco General Interface is an open source AJAX framework. Earlier in 2007, Tibco released the Tibco General Interface Test Automation Toolkit, which is a version of Selenium with extensions to support testing the Ajax components in the Tibco General Interface.

In March of 2007, SOASTA announced its intent to provide a Web UI/AJAX/Flex testing solution as part of its strategy to provide a single integrated testing environment to support the automated testing of all Web tiers from the message layer through the browser UI. SOASTA's implementation will subsume the "selenese" event model implemented in Selenium Core into SOASTA's product architecture. This capability will become available in December 2007.

Summary
AJAX UI technology represents a major step forward for browser UIs but automated cross-browser testing remains challenging. Knowledge of the HTTP message stream is vital to designing successful test automation.

Available solutions require expert assembly (open source) or are developer frameworks that support writing code to test the browser UI.

Selenium delivers a different approach to solving this challenge and has gotten a lot of attention from Web developers and software vendors as a potential solution.

Resources
•   Selenium: Selenium Core 0.8.3 Reference www.openqa.org/selenium-core/reference.html
•   www.40withegg.com/2007/1/5/using-selenium-s-waitforvalue-waitforcondition-for-ajax-tests
•   www.josephmoore.net/2005/11/using-seleniums-waitforvalue.html
•   http://ajaxpatterns.org/Browser-Side_Test
•   http://ajaxian.com/archives/squish-for-Web-testing-tool
•   http://agiletesting.blogspot.com/2006/03/ajax-testing-with-selenium-using_21.html
•   GTAC Presentation Jason Huggins & Jen Bevan www.youtube.com/watch?v=qxBatJ1N_Og
•   GTAC Presentation Simon Stewart www.youtube.com/watch?v=tGu1ud7hk5I
•   GTAC Presentation Apple Chow & Santiago Etchebehere www.youtube.com/watch?v=hWQdCdH77NA
•   http://www.openqa.org/selenium-core/reference.html

More Stories By Ken Gardner

Ken Gardner, executive chairman for SOASTA, is an industry veteran with more than 30 years in the enterprise software industry. He is a six-time entrepreneur having previously been the founder and CEO of Istante (acquired by Oracle in December 2004); Sagent Technology (IPO in April 1999); ReportSmith (acquired by Borland in March 1994); and ViewPoint Systems (acquired by Knowledgeware in June 1992). His first startup, in 1985, was Tesseract Corporation where he was senior vice president of Technology. From 1978 to 1985, he worked in R&D at Tymshare, Inc.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.