Syn - a Standalone Synthetic Event Library

Syn is used to simulate user actions such as typing, clicking, dragging the mouse. It creates synthetic events and performs default event behavior.

Features

  • Enables complex JavaScript functional testing.
  • Standalone (does not need jQuery).
  • Cross Browser (IE6+, FF1.5+, Opera 9.6+, Safari 4+, Chrome 4+) and multi-platform (Win, Safari, Linux).
  • 99.9% browser sniffing free (only 1 sniff to prevent crashing Safari).

Why

Testing rich, dynamic web applications sucks. At Jupiter, we've tried almost every testing solution available (qUnit, Quick Test Pro, Selenium, JsUnit, Env.js, TestCase) and all of them suffer from some fatal flaw.

Problems:

  • Manual - A tester has to run the tests manually on every supported browser. People are lazy.
  • Unit Tests Only - We need to test the app as a whole and complex UI behavior like drag-drop.
  • Low fidelity - We need to make sure the tests are reporting accurate results.
  • Difficult to write - We sling JS like a ninja monkey throws poo. We want to write tests in a nice JS API.
  • Expensive - A QTP license is 5k a person! I'd rather buy a vacation.
  • Support - We want to test Mac and Linux browsers.

We've solved all of these problems in FuncUnit testing framework. It's a mashup of qUnit, Selenium, Rhino, and Env.js. But its core library which does the work of simulating user actions with very high fidelity is Syn.

Documentation

JavaScriptMVC's Syn documentation.

Javascriptmvc
© Jupiter IT - JavaScriptMVC Training and Support