ted husted presentation testing the testers ae2009

45
Testing the Testers YUI Test versus QUnit Wednesday, September 16, 2009 - 2:35-3:35p

Upload: ajax-experience-2009

Post on 13-May-2015

1.086 views

Category:

Technology


8 download

TRANSCRIPT

Page 1: Ted Husted Presentation Testing The Testers Ae2009

Testing the Testers

YUI Test versus QUnit Wednesday, September 16, 2009 - 2:35-3:35p

Page 2: Ted Husted Presentation Testing The Testers Ae2009

Testing the Testers: YUI Test versus QUnit

Yahoo UI (YUI) Library known for quality code.

YUI Test frameworkJQuery known for concise, quality code.

QUnit testrunner. Ready to test your own

YUI Unit or QUnit?

Page 3: Ted Husted Presentation Testing The Testers Ae2009

Testing the Testers: YUI Test versus QUnit

How to create unit tests for YUI Test and QUnitWhen to use YUI Test or QUnitHow to integrate unit testing into your Javascript development cycle.

Page 4: Ted Husted Presentation Testing The Testers Ae2009

QUnit

Testrunner for the jQuery project.Add functional/regression testing to plugins.Efficient JQuery-like design paradigm.

Page 5: Ted Husted Presentation Testing The Testers Ae2009

QUnit - Key Features

Top-Level QUnit Project since May 2008No stable releaseOnline download from Subversion

UI Focus Plugin Testing

Regression TestingLight-weight testrunner Key Contributor - Jorn Zaefferer

Page 6: Ted Husted Presentation Testing The Testers Ae2009

http://docs.jquery.com/Qunit

Page 7: Ted Husted Presentation Testing The Testers Ae2009
Page 8: Ted Husted Presentation Testing The Testers Ae2009
Page 9: Ted Husted Presentation Testing The Testers Ae2009
Page 10: Ted Husted Presentation Testing The Testers Ae2009
Page 11: Ted Husted Presentation Testing The Testers Ae2009
Page 12: Ted Husted Presentation Testing The Testers Ae2009
Page 13: Ted Husted Presentation Testing The Testers Ae2009
Page 14: Ted Husted Presentation Testing The Testers Ae2009
Page 15: Ted Husted Presentation Testing The Testers Ae2009
Page 16: Ted Husted Presentation Testing The Testers Ae2009
Page 17: Ted Husted Presentation Testing The Testers Ae2009
Page 18: Ted Husted Presentation Testing The Testers Ae2009

http://dev.jquery.com/browser

Page 19: Ted Husted Presentation Testing The Testers Ae2009
Page 20: Ted Husted Presentation Testing The Testers Ae2009
Page 21: Ted Husted Presentation Testing The Testers Ae2009

QUnit - Strengths and Weaknesses

StrengthsBundled with JQueryUsed by JQueryConcise APIBrowser friendly

WeaknessesProprietary syntaxLacks server supportNot well knownSole contributor

Page 22: Ted Husted Presentation Testing The Testers Ae2009

QUnit - Bottom Line

Use when coding JQuery plugins and other applicationsGood for UI testsEssential for regression testingWorks well with test-driven developmentFor true acceptance tests, add Selenium to the mix

Page 23: Ted Husted Presentation Testing The Testers Ae2009

QUnit - Resources

Getting Started with JQuery QUnithttp://www.lostechies.com/blogs/chad_myers/archive/2008/08/28/getting-started-with-jquery-qunit-for-client-side-javascript-testing/printerfriendly.aspx

Unit Testing Javascript using JQuery QUnithttp://highoncoding.com/Articles/570_Unit_Testing_JavaScript_Using_JQuery_QUnit.aspx

Running JQuery QUnit under Continuous Integrationhttp://www.lostechies.com/blogs/joshuaflanagan/archive/2008/09/18/running-jquery-qunit-tests-under-continuous-integration.aspx?CommentPosted=true#commentmessage

Testing ASP.NET MVC QUnit http://www.bradygaster.com/post/Testing-ASPNET-MVC-with-QUnit-Part-1.aspx

Some Qunit Tipshttp://hammett.castleproject.org/?p=300http://hammett.castleproject.org/?p=300

Functional Testing Javascript with QUnithttp://www.eviltester.com/index.php/2008/06/17/functional-testing-javascript-with-qunit-initial-steps/http://www.eviltester.com/index.php/2008/06/17/functional-testing-javascript-with-qunit-initial-steps/

Page 24: Ted Husted Presentation Testing The Testers Ae2009

YUI Test

Testing framework for browser-based solutions.Add unit testing to JavaScript solutions.Derives characteristics from nUnit and jUnit.

Page 25: Ted Husted Presentation Testing The Testers Ae2009

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.

Page 26: Ted Husted Presentation Testing The Testers Ae2009

YUI Test - Key Features

Support for “A-Grade” BrowsersRelease 2.5.2 (2008 May)

Since July 2007 (YUI 2.3.0)

License – BSD~16 Team Members

Yahoo! employees and contributorsMaintained by Nicholas C. Zakas

http://www.nczonline.net/

Page 27: Ted Husted Presentation Testing The Testers Ae2009
Page 28: Ted Husted Presentation Testing The Testers Ae2009
Page 29: Ted Husted Presentation Testing The Testers Ae2009
Page 30: Ted Husted Presentation Testing The Testers Ae2009
Page 31: Ted Husted Presentation Testing The Testers Ae2009
Page 32: Ted Husted Presentation Testing The Testers Ae2009
Page 33: Ted Husted Presentation Testing The Testers Ae2009
Page 34: Ted Husted Presentation Testing The Testers Ae2009

YUI Test - Strengths and Weaknesses

StrengthsBundled with YUI LibraryLarge, well-funded teamRegular releasesWell Documented3rd party IDE support

WeaknessesBundled with YUI LibraryLacks server supportCommunity is stagnantGrowth is stagnant

Page 35: Ted Husted Presentation Testing The Testers Ae2009

YUI Test - Bottom Line

Good for simple event/form testsNeeds better automation toolsFor true acceptance tests, add Selenium to the mix

Use when coding JavaScript or Ajax applications (and Test-Driven Development)

Page 36: Ted Husted Presentation Testing The Testers Ae2009

YUI Test - Resources

Writing Effective JavaScript Unit Tests with YUI Test Nicholas D. Zakas (2009 January)http://yuiblog.com/blog/2009/01/05/effective-tests/

Test Driven Development with YUI TestNicholas 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

Page 37: Ted Husted Presentation Testing The Testers Ae2009

Open QA Selenium

Selenium is a suite of toolsSelenium IDE

records and runs tests

Selenium Remote Controlruns across multiple platforms

Selenium Grid runs across multiple machines

http://selenium.openqa.org/documentation/

Page 38: Ted Husted Presentation Testing The Testers Ae2009
Page 39: Ted Husted Presentation Testing The Testers Ae2009
Page 40: Ted Husted Presentation Testing The Testers Ae2009
Page 41: Ted Husted Presentation Testing The Testers Ae2009

f:cd "F:\opt\selenium-remote-control-1.0-beta-2\selenium-server-1.0-beta-2"java -jar selenium-server.jar

Page 42: Ted Husted Presentation Testing The Testers Ae2009
Page 43: Ted Husted Presentation Testing The Testers Ae2009
Page 44: Ted Husted Presentation Testing The Testers Ae2009

Please complete an evaluation.

Page 45: Ted Husted Presentation Testing The Testers Ae2009

Questions?