JUnit and inheritance

I want to make a number of tests, which inherit from each other, due to common functionality.

The problem is when running each class, JUnit executes all tests within that class, therefore i run some tests number of times, which is absolutley unneccessary.

 

Can i avoid this ?

Comments

You can put the common functionality in the base class. This functionality is inheritted but its NOT a test method (which mean - it will NOT run in the parent class). Then you can use this functionality in the children test classes.