RadRails provides several features to support Test::Unit testing. The Test::Unit view provides detailed information about test runs, including error traces, test counts and a color-coded results bar. Toolbar shortcuts provide quick access to running unit, functional and integration tests. The autotest runner will run a test suite in the background while you work, and keep you updated via a toolbar icon. Let's look at each feature in more detail.
The Test::Unit view can be shown by navigating to Window -> Show View -> Test::Unit, or to Window -> Show View -> Other -> Ruby -> Test::Unit. Results from all test runs are shown in the Test::Unit view (with the exception of the autotest suite that is run in the background). To launch a single test, right-click on the file in the Rails navigator and select Run As -> Test::Unit Test.
If you'd like to run groups of tests, use the toolbar shortcuts and run your unit tests, functional tests, integration tests, or all tests at once. The results of the suite will be shown in the Test::Unit view.
You can use the autotest runner to run test suites in the background while you work. First visit the autotest preference page by navigating to Window -> Preferences -> Rails -> Autotest. The default values are to run the associated unit test for a model, functional test for a controller, and plugin test for a plugin. You can configure the preferences to your liking.
Once you've configured the autotest runner to suit your needs, return to the workbench. Look to the toolbar and you'll see two important buttons. The first is Enable/Disable Autotest and the second is Run Autotest Suite. The Enable/Disable Autotest button does just what it says. If checked, the autotest runner will run your test suites in the background. You can use this to quickly toggle autotest on and off during intense development. The second button has a small status icon in its lower left corner. This icon will indicate the status of the current autotest run. A green check (Figure 1.6) indicates all tests have passed, a blue X (Figure 1.7) indicates one or more test failures, and a red X (Figure 1.8) indicates one or more test errors. If you click on the button, the autotest suite that you have configured will be run in the foreground (instead of the background by the autotest runner) and the results will be shown in the Test::Unit view (Figure 1.9).