logo WOUTRunner is a Cocoa application for running JUnit tests of WebObjects projects. It is based on the WOUnitTest framework.


Junit comes with an AWT and a Swing tool to run tests. These applications are interesting beyond their gui because they come with a ReloadingClassloader. So you can leave them running all day and every time you change some code and/or testcases, just have the application reload and test everything. This is usually more convenient and faster than restarting a WOApp and then going to the WOUnitTest page to invoke the tests all the time. It also allows to develop frameworks without a WOApp. Unfortunately, these tools don't work very well with typical WebObjects projects. Their classloader often fails reloading code, the gui doesn't look or feel native on Mac OS X, and launching them with the correct parameters and classpath isn't trivial.

WOUTRunner is a new application written to address the aforementioned problems of Junit's tools. It stands for WebObjectsUnitTestRunner, which means it is a tool to run tests, specifically with WebObjects in mind. It has it's own classloader implementation, able to reload code typical in WebObjects projects. WOUTRunner is based on WOUnitTest, taking advantage of all its features. A Cocoa gui offers a native user experience on Mac OS X. The classpath and other parameters can be configured in a convenient graphical environment editor part of WOUTRunner, changed at runtime, saved to and loaded from files.

WOUTRunner has additional features making it more useful than the Junit tools. It automatically detects if reloading of code is necessary, and does this automatically when the user runs the tests. It shows test suites down to the level of test method and allows the user to run those individually. In the case of test failures or errors, clicking on the resulting stacktrace opens and selects the corresponding line of code in Xcode just like the HTML interface of WOUnitTest does. On slower machines, regular reloading of code can take some time. WOUTRunner allows the user to easily focus on a subset of tests, which hides the other tests and as a result reduces the time required for reloading.

Get release 1: WOUTRunner_r1.gnutar.gz (2004/03/26)
or check out the latest version from the project's CVS repository.


The main window running all tests. So far, 11 tests have been executed and all of them were successful.

main screenshot

All selected tests ran successful. OK screenshot

Here are three errors and two failures. We're inspecting one of the failures' stacktrace and could click on one of the Line# buttons to go to the corresponding line of code in Xcode. Failure screenshot

It is possible to select and run individual test methods of a testcase class. Methods screenshot

An integrated console enables you to see output generated by the code under test. Console screenshot

The classpath and other parameters can be edited in this environment editor. EnvironmentEditor screenshot

©2004 Christian Pekeler (pekeler.org)

SourceForge.net Logo