Ajax Testing Tool Review when to test, what to test, how to test Ajax applicationsWednesday, October 1st, 1:00 – 2:30pTed Husted • In this session, we explore • when to test, what to test and how to test Ajax components. • creating automatic tests with various tools, including YUI Test and OpenQA Selenium • how to use Ajax testing tools with IDEs and continuous integration systems.
Ajax Testing Tool Reviewwhen to test, what to test, how to test Ajax applications Square One University Series
For the latest version of this presentation, visit http://slideshare.com/ted.husted For the latest version of source code,visit http://code.google.com/p/yazaar/ Ajax Testing Tool Review
Abstract Not long ago, testing Ajax components meant play-testing a page by hand. Today, there are a growing number of tools we can use to simplify and automate Ajax testing. During the session, we will cover when, what, and how to test Ajax applications creating automatic tests with various tools testing with IDEs and continuous integration systems
Ajax Testing Tool Review Tool Review JsUnit and YUI Test Selenium Cruise Control and Hudson Ajax Testing in Action Live Coding Demonstration YUI Test + Selenium + Hudson + Eclipse
JsUnit – Key Features Browser Support - Internet Explorer 5.0+, Firefox or Mozilla 0.9+, Netscape 6.0+, and Konqueror 5+. Release - 2.2 (Alpha, 2006 March) 2.2.0 (tagged 2008 Jan) Since 2001 License - GPL, LGPL, MPL One team member
JsUnit No Form Support No Asynchronous Support Server Support - Java IDE Support - Eclipse, IDEA CruiseControl Support
JsUnit Strengths Established, xUnit model, Active community. • Weaknesses • Sole Developer, • Conservative License, • Irregular release schedule, • Several known limitations.
JsUnit Bottom Line Use when team members are already experienced with jsUnit (and licensing is not an issue) Consider YUI Test to test asynchronous code if starting fresh (or willing to try something new). For acceptance tests, add Selenium to the mix
JsUnit Resources AJAX and Unit Testing - it's time to mingle Jim Plush (2006 Feb) http://www.litfuel.net/plush/?postid=117 Ajax and Unit Testing Part Two, The Wrath of Mock Jim Plush (2006 Nov) http://www.litfuel.net/plush/?postid=154
YUI Test – Key Features Create test cases through simple syntax. Failure detection for methods that throw errors. Group related cases using test suites. Asynchronous tests for testing events and Ajax communication. Cross-browser DOM Event simulation.
YUI Test – Key Features Support for “A-Grade” Browsers Release 2.5.2 (2008 May) Since July 2007 (YUI 2.3.0) License – BSD ~16 Team Members Yahoo! employees and contributors Maintained by Nicholas C. Zakas http://www.nczonline.net/
YUI Test Form Support Asynchronous Support No Server Support No IDE Support No CI Support
YUI Test Strengths Bundled with YUI Library Large, well-funded team Regular releases Active community Well documented • Weaknesses • Bundled with YUI Library • Lacks server support
YUI Test Resources Test Driven Development with YUI Test Nicholas D. Zakas (2008 September) http://ajaxexperience.techtarget.com/assets/documents/Nicholas_Zakas_Test_Driven_Development.pdf (presentation) Writing Your First YUI Application Eric Miraglia (2008 May) http://www.insideria.com/2008/05/writing-your-first-yui-applica.html
Open QA Selenium Selenium is a suite of tools to automate web app testing across many platforms Selenium IDE records and runs tests as a Firefox Plugin. Selenium Remote Control runs tests across multiple platforms Selenium Grid distributes test running across multiple machines
Selenium – Key Features Create test scripts using Selenium Commands. Run tests in against live applications. Compile test scripts in native languages, such as Java, C#, Ruby. Integrate scripts with other test suites and continuous integrations systems.
Selenium – Key Features Support for major browsers Firefox 2+, (RC and Core) IE7, Safari 2+, Opera 8+, Windows, OS X, Linus, Solaris. Current Releases IDE, RC, Grid, 2008; Core: 2007 Since 2005 License – Apache ~11 Team Members Originated as ThoughtWorks project