Running all JUnit tests in a project also runs tests from libraries?
I'm new to JUnit, but I thought I should start learning how to use it to
structure my testing methods a bit better.
I've added a couple of JUnit test cases to a project I'm working on, and
added JUnit as a library in order to be able to extend TestCase and so
on. Now I want to run all tests in the entire project. To do this I
created a new JUnit configuration named "TestAll", defined as follows:
Test: All in package
Package: (empty)
Search for tests: In whole project
When I run this test configuration, IDEA also runs tests from libraries,
such as junit.extensions.ExceptionTestCase which fails. Is this
intentional?
I tried explicitly choosing all relevant top-level packages (yes,
there's more than one). The package chooser allows multiple selection,
but only one of the selected packages ends up in the package text field.
Am I missing something? Is there another way to run all tests in the
entire project, without running tests that happen to be included in
libraries? Or am I simply going about this the wrong way?
Please sign in to leave a comment.
Nope, this is very much a known issue, and the usual workaround is to select the top-level package.
--Dave Griffith