How to run unit tests in only in a given directory?

I'm trying to separate unit tests from integration tests by placing them in different folders. Let's call them test/unit and test/integration. I'm using Spring's Integration testing functionality, so my integration tests extend a class whose grandparent is the TestCase class.

I would like to have a possibility of executing only the unit tests (i.e. the tests found in test/unit directory) in IDEA. Unfortunately IDEA seems only to allow executing tests in a given package, not in a given directory.

Is there something I'm missing here? Or is there a more reasonable way to separate unit tests and integration tests?

Please sign in to leave a comment.