DailyJS

JsTestDriver

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

java testing

JsTestDriver

Posted by Alex R. Young on .
Featured

java testing

JsTestDriver

Posted by Alex R. Young on .

JsTestDriver is a test runner that you can use to run tests against different browsers.
Browsers are treated like sandboxes, using a capturing API that allows
tests to run against multiple browsers. It works on the command line, so
once a browser has been captured it can be minimized and forgotten
about.

It can run tests in parallel as well, so running tests against many
browsers on many platforms isn't any more time consuming than a single
test run. The production and test code is stored in each browser and
reloads only when source files have changed, so this adds an additional
speed boost.

This video by the author explains the basics:


Tests look like this:

GreeterTest = TestCase("GreeterTest");

GreeterTest.prototype.testGreet = function() {
  var greeter = new myapp.Greeter();
  assertEquals("Hello World!", greeter.greet("World"));
};

If you'd like to try it out, the introductory
documentation

should get you up and running pretty quickly.