views:

14

answers:

2

We have a bunch junit tests in our current project. Essentially we are looking for a way to run all the test in a given package. Currently in Netbeans I see you can run all the tests or a single test, but no way to run a a sub-set of tests.

Is this built into Netbeans? Or is there another way we can do this?

A: 

Just set up junit test groups like documented e.g. on this question and then run the test group via your ant or maven build.

Manfred Moser
+1  A: 

In JUnit this is achieved through TestSuite. You can check for more information here (look at the code, not at the pictures). At least in the Eclipse IDE there is a functionality that lets you add a new TestSuite, select which tests it is to include and then have the IDE generate it for you. I haven't seen such thing in Netbeans, but you should check for any additional JUnit plugins.

vstoyanov