How can I run particular sets of JUnit tests under specific circumstances?
问题 I have a Java codebase that is developed exclusively in Eclipse. There are a set of JUnit4 tests that can be divided into two mutually exclusive subsets based on when they are expected to run: "Standard" tests should run when a developer right-clicks the test class (or containing project) and selects Run As > JUnit Test. Nothing unusual here—this is exactly how JUnit works in Eclipse. "Runtime" tests should only run when called programmatically from within the application when it is started