Java – how do I run unit tests against only changed source files?

Is there a way for me to run unit tests only for the Java classes it builds? For example, if MyClass If Java has expired, ant will build MyClass class. After that, I want it to also run myclasstest and myclasstestsuite (if they exist) It does not have to be based on a naming convention I can use comments or any other effective method

Editor: several people said it was a bad idea If I plan to check in without running all the unit tests, that's it My main project has more than 16000 unit tests, which takes about 20 minutes to run I'll run them before check - in, but it's impractical to run the whole suite every time I change the file Sorry, I should give more background information

Solution

I don't recommend this method. It's likely to miss the error caused by side effects

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>