Syn is a synthetic event library that makes testing easier.

Original author: Rey Bango
  • Transfer
The Jupiter IT team has released Syn , a library that allows you to create synthetic events for use in testing. This separate library is designed to assist in testing the complex behavior of the user interface by simulating user actions, such as typing with the keyboard, clicking and dragging with the mouse.

Testing rich, dynamic web applications is tricky. In our company, we have tried almost all available testing solutions (qUnit, Quick Test Pro, Selenium, JsUnit, Env.js, TestCase), and all of them suffer from fatal flaws.

  • Manual work - the tester must manually run the tests in each supported browser. People are lazy;
  • Unit tests only - We need to test the application as a whole, as well as the complex user interface, including such nuances as drag and drop behavior;
  • Low accuracy - We must make sure that test reports give accurate results;
  • Difficulty writing - We want to write tests using the convenient JS API;
  • High cost - QTP license costs 5K per person! Better pay for your vacation;
  • Support - We want to test also in browsers for Mac and Linux.

We solved all these problems within the framework of an upcoming testing framework called FuncUnit. This is a mashup from qUnit, Selenium, Rhino, and Env.js. However, its main library is Syn, which imitates user actions with very high accuracy, what we are releasing today.

For example, using this code: {},'hello' )
  .type( 'Hello World' )
  .drag( $('#trash') );

* This source code was highlighted with Source Code Highlighter.

You can simulate clicking on an element with hello identifier, typing “Hello World”, and then dragging the mouse from that element to an element with identifier trash.

Just a great thing. Watch their demo to see how events are recorded and played back .

Also popular now: