Search code examples
javamavenguard

Automated unit testing for java as soon as code changes


Are there any tools/libraries like Guard (for Ruby on Rails) for Java which listen to file system changes i.e. changes to the code files in the project and automatically run unit tests associated with that class or the entire project.


Solution

  • Looks like you need something like Jenkins, running locally + FSTrigger plugin.

    But if you need to monitor file system changes from your app (Guard is general-purpose tool), there is discussions on Stackoverflow about it:

    Is there a sophisticated file system monitor for Java which is freeware or open source?

    File changed listener in Java

    How to detect filesystem has changed in java