Reputation: 933
I found similar questions but no satisfactory answers. In addition, most answers were rather old as well, so I wonder if the combination eclipse / Junit got better in the meantime.
Instead of packing projects into test suites, I would like to spread tests cases all over the place in the package structure (I'm programming in Java). Then right clicking on whatever package (on the package explorer) should bring the option Run As -> JUnit Test and run all the unit tests in that package and below (recursively). In this way, I wouldn't have to care about maintaining the test structure, it would be in the packages themselves.
I've seen that this works only with end packages (with no children), but not recursively. Do you have any ideas? I'm using eclipse Kepler (4.3.0), JUnit 4 and Java 1.6.
Upvotes: 3
Views: 992
Reputation: 2053
Why cant you create a run config in eclipse to run all the JUnit tests ? Refer the screen shot. Select the radio button which says
Run All tests in the selected project, package or source folder.
Upvotes: -1