Is there a way to get ant to run unit tests only for the java classes that it creates? For example, if MyClass.java is deprecated, ant will build MyClass.class. After that, I want it to also run MyClassTest and MyClassTestSuite if they exist. It should not be based on a naming convention. I would be fine with annotations or any other method that works.
EDIT: Several people make fun of it, saying that this is a bad idea. This would be if I were planning to test without completing all of our unit tests. My main project has more than 16 thousand units of tests, which take about 20 minutes. I ran them all before registering, but it is completely impractical to run the whole package every time I change the file. Sorry, I should have provided more context.
source
share