Art Of Programming

musings by Dmytrii Nagirniak

JavaScript Testing Tools

For now just a list. Maybe later I’ll update this:
  • JsUnitTest (MIT) - based on unittest.js from prototypejs, but not depend on it.
  • JsUnit (GPL, LGPL, MPL) - essential port of JUnit..
  • YUI Test (BSD) - YUI Based. Not a port from xUnit.
  • CrossCheck (Licence?) - in-browser testing. Code will run in many different browsers, but without needing installations of those browsers (requires JVM ).
  • Selenium (Apache 2) - in-browser web application testing (simulates user actions).
  • Js-Unit-Testing (MIT)
  • RhinoUnit (BSD)
Also the TestDrivenJavascript has some useful info.
Not sure if I need to put my opinion here about all of these tools, but I will :)

I’m very sceptic about Crosscheck. Why should we introduce a browser simulator to test behaviour in a real browser. We just cannot rely on such tests.
Not sure about JsUnitTest, Js-Unit-Testing and RhinoUnit. For me there are obvious leaders in this list: YUI Testing, JsUnit for unit testing and Selenium (better for acceptance tests).

Comments

Dmytrii Nagirniak
Selenium itself is based on JS and is intended to simulate user actions and verify the result.

As it’s based on JS and uses browser DOM and is executed inside a browser, you can easily add your own extensions to it via JavaScript. But the purpose of Selenium is not to do unit testing, but rather acceptance testing.
Alexander
Does selenium allow js testing yet? Did you try using it?

I’m just asking because selenium I have seen before ( 3 yr ago ) was only capable of sending/recieving some http data, thus unable to work js testing out.

Comments