I had some problems getting Hudson to play along with "Hudson ruby metrics plugin", so I wrote this guide to document my setup. Hope it helps someone else out.
Based loosely on: http://www.juretta.com/log/2008/11/11/hudson_test_drive_part_1_rails/
Notice that Saikuro reports aren't currently working.
Hudson needs to have the following plugins installed: "Hudson Ruby Plugin", "Hudson ruby metrics plugin". Also, the build server needs Ruby and rubygems.
The build process will take care of installing any gems, as long as they are in "config/environment.rb".
edit Rakefile and add the following:
Install the rcov-plugin, by running:
Add a dummy test case, to please rcov. Put the following in "test/unit/dummy_test.rb", "test/functional/dummy_test.rb" and "test/integration/dummy_test.rb":
(Once you add real test cases to the project, you can remove these again)
Unless you require a MySql database, you can set the test database to sqlite. Otherwise, you'll have to create a test database somewhere, and put credentials in "database.yml". Remember to add sqlite as a dependency to "config/environment.rb", if you use it.
Since Rake can't always install missing gems through the "rake gems:install" task, we'll have to put the install the following plugin:
SVN add new files and commit the changes.
Select "New Job"
Check option "Build a free-style software project" and enter a name. The name should be CamelCaseWithoutSpaces
Under "Source Code Management", select "SVN"
Under "Build Triggers", select "Poll SCM"
Select "Add Build Step" -> "Execute shell"
(Note that if your GEM_PATH differs, you'll have to adjust it in the above)
If you'd prefer to only make coverage reports for unit tests, you can replace "test:test:rcov" with "test:units:rcov test"
Under "Post-build Actions", select "Publish JUnit test result report", "Publish Rcov report" and "Publish Rails stats report"
In "Test report XMLs", enter "trunk/results/*.xml"
In "Rcov report directory", enter "coverage/units"
Click "Build Now" to test the configuration.