0

I have set up eclipse to work just as I want with my java web app using the following instructions : https://stackoverflow.com/a/6189031/106261.

Is it also possible to get unit tests to be run as part of the auto build, without running a maven install (or test). So I make a change to a class, the tests get run, and if a fail occurs I get a some sort of indicator. Without needing to manually run maven test.

Community
  • 1
  • 1
NimChimpsky
  • 46,453
  • 60
  • 198
  • 311
  • 1
    possible duplicate of [Is it possible to run incremental/automated JUnit testing in Eclipse?](http://stackoverflow.com/questions/4842042/is-it-possible-to-run-incremental-automated-junit-testing-in-eclipse) – Aaron Digulla Feb 13 '12 at 16:12
  • It's not needed to do a mvn install to run unit test (mvn clean package will do the job). – khmarbaise Feb 13 '12 at 16:15
  • @khmarbaise mvn clean doesn't, in my set up anyway. But the point of the question is without using maven at all. – NimChimpsky Feb 13 '12 at 16:17

1 Answers1

1

There are several ways to achieve this, all with their own limitations:

  1. You could set up a CI server which builds your project every time you commit a new version. Very reliable but not really "real time"

  2. You can add your own builder to the list of builders (project properties -> Builders), for example an Ant builder which runs "ant test" or something. This builder gets invoked every time you save. Every time. That means Eclipse will become a total slug unless running your unit tests takes less than a few milliseconds.

  3. You can use one of the plugins mentioned here: Is it possible to run incremental/automated JUnit testing in Eclipse?

Community
  • 1
  • 1
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820