Thursday, October 8, 2009

Get rid of "No runnable methods"

I have a couple of base tests. They are simply for setting up and extension by sub test classes, and have no test methods. Their names are the pattern of "*Tests". This works fine with maven "mvn test". But in Eclipse, when you right click "src/test/java" and "Run as > JUnit test", Eclipse will throw errors "No runnable methods". The trick is to add @Ignore on these base test classes so Eclipse won't bother again. This is of course JUnit 4 style annotation.

No comments:

Post a Comment