JUnit : Is there a way to skip a test belonging to a Test class's parent?

Posted by Jon on Stack Overflow See other posts from Stack Overflow or by Jon
Published on 2011-02-11T15:19:55Z Indexed on 2011/02/11 15:25 UTC
Read the original article Hit count: 179

Filed under:
|
|

I have two classes:

public abstract class AbstractFoobar { ... }

and

public class ConcreteFoobar extends AbstractFoobar { ... }  


I have corresponding test classes for these two classes:

public class AbstractFoobarTest { ... }

and

public class ConcreteFoobarTest extends AbstractFoobarTest { ... }


When I run ConcreteFoobarTest (in JUnit), the annotated @Test methods in AbstractFoobarTest get run along with those declared directly on ConcreteFoobarTest because they are inherited.

Is there anyway to skip them?

© Stack Overflow or respective owner

Related posts about java

Related posts about unit-testing