I want to run my unit tests automatically when I save my Eclipse project. The project is built automatically whenever I save a file, so I think this should be possible in some way.

How do I do it? Is the only option really to get an ant script and change the project build to use the ant script with targets *build* and *compile*?

**Update** I will try 2 different approaches now:

1. Running an additional builder for my project that executes the ant target *test* (I have an ant script anyway)
2. [ct-eclipse](http://ct-eclipse.tigris.org), recommended by [Thorbjørn](https://stackoverflow.com/questions/1775465/run-junit-automatically-when-building-eclipse-project/1775634#1775634)