Sunday, October 19, 2008

New Test Suite

We are currently working on moving Joose to a more robust test suite. While Joose's original test suite format was already based on TAP, it was missing many features expected from a test harness, mainly it didn't support being run from the command line.

The new test harness was developed by Jeremy and it gives us the following advantages:
  • Support for command line tools (Rhino, V8, JScript.NET)
  • Good summary reporting for test results
  • When run in the browser all tests run in a single window (faster than one iframe for each test file)
  • Each test gets their own lexical scope, so that variables won't pollute the global namespace
  • Good support for tests that run asynchronously: The test runner now waits until all tests were executed or their was an error
We are still working on moving the test files over to the new format. All test files are located in ./tests/. The old ones have a simple .js extention and the new files use .t.js. If you are thinking about joining Joose development, moving over a test file would probably the perfect way to get your hands dirty. If you are interested, join the mailing list.

No comments: