Writing integration tests for Hudson was hard, here are the ugly bits:
- Subversion local repository is created with svnadmin create in a temporary directory
- Actual builds are done with shell script, this will only work on *nix machines
- There are various reflection hacks. The Hudson API could be more consistent in that area and allow to set field values programmatically
See for yourself and run mvn test in Hudson Tester. There's a long way to go to be able to
easily write tests for Hudson, but the proof of concept works. I hope
this test-driven approach can help Hudson developers implement new features more
efficiently and prevent regressions across releases.