Intellij-idea – Automatic JUnit on SVN checkin

hobbitmonintellij-ideajunitsvn

I'm using IntelliJ-Idea to write Java daemons. We use JUnit to unit test our code and want to have automated runs on check-in to subversion.

Are there any tools available that can automatically run unit tests and then send reports in email and to Hobbit?

Best Solution

I think you should look into continuous integration, as others have suggested. I've personally tried CruiseControl and Hudson, and prefer Hudson. You can just download it and run it to see if you like it, configuration is a breeze, just:

  1. Download hudson.war from http://hudson.dev.java.net.
  2. Run it in standalone mode (java -jar hudson.war).
  3. Point your browser to http://localhost:8080 to configure and use.

It has built-in support for Maven and Ant if you use those, but if not, you can simply write your own batch file/shell script.

If continuous integration is not an option, you can look into the use of a Subversion post-commit hook (http://svnbook.red-bean.com/en/1.0/svn-book.html#svn-ch-5-sect-2.1). I have no experience with using hooks for the purpose you described, so I really can't offer a lot of help here.