java - How can I run unit tests for just the source files which have changed? -


Is there any way i can take an ant to run unit tests for chima classes? For example, if MyClass.java is outdated, then Ant will build MyClass.class, then I want to run MyClassTest and MyClassTestSuite as well if they exist. This nomenclature is not based on the conference. I am fine with using annotation or any other method.

Edit: Many people have shouted on saying that this is a bad idea. It will be , , if I plan on checking all the unit tests without running, there are more than 16 unit tests in my main project, which takes about 20 minutes to run the run. Before the check-in I will drive them all, but every time I change a file, then it is completely impractical to run the entire suit. Sorry, I should have given more context.

I do not recommend this approach, it is a good opportunity for errors initiated by side effects .


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -