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. |