13. arr test("JavaScript results",function(){ S('input').click().type("JavaScript") // wait until we have some results S('.autocomplete_item').visible(function(){ equals( S('.autocomplete_item').size(), 5, "there are 5 results") }) });
How many of you write jQuery applications? How many of you test them? How many of you enjoy testing them? You're in the right place.Honestly this project is so far ahead of the competition when it comes to functional testing, if you’re not convinced when I’m done, I’ve done a terrible job.
Here is a high level overview of what’s out there right now. A bunch of tools written for server side developers who make web pages. Qunit doesn’t really count because its not functional testing.Logic in web applications are moving more into the rich client. These tools are designed for the time when most logic happened on the server after a click or form submission. FuncUnit is designed for the world of rich client web apps.FuncUnit is to Functional testing what jQuery was to JavaScript development. It provides an approachable way to write maintainable cross browser tests.
Funcunit is built on the shoulders of giants. Under the hood, it uses Selenium, Qunit, jQuery, Syn.js (a synthetic event simulation library), env.js, and Rhino.
We love Selenium. But it wasn’t built for JS developers or by JS developers.
FuncUnit will make testing fun, easy, and approachable. It was built by jQuery developers for jQuery developers, and in that sense is the first functional testing tool of its kind.
Everyone simply hates testing. Why is that?
Setup, Installation, Cost, Difficult APIsQTP costs 5K per license
No setup, open source, free, no installation
APIs are another language to learn
APIs are another language to learn
LeveragesjQuery knowledge
LeveragesjQuery knowledge
Run tests only one way....scripted via serverDebugging across platforms, languagesNo firebug breakpoints
Run tests in browserSet firebug breakpoints
brittle/low fidelitydoesn’t corectly simulate browser JS eventsNot designed for crazy JS apps, designed for web apps with HTML and navigation
For example: selenium clicks simulate a click event, in browser this actually sends a focus event if you’re clicking an input. If your JS code depends on this focus, it will break. There are a LOT of cases like this. Syn was developed to accurately simulate everything possible
syn.js, a library that simulates high fidelity browser eventsGoes to extra trouble to make sure each browser works as intended (recorder app that checks how certain keypresses work)TheSizzle of event simulationPicked up by Mootools testing team also
Complex scenario to reproduce the issueCan’t send you a URL to easily repo locally
Send a URL to a test caseDevs write and maintain tests!