public class AdvancedRunner
extends org.junit.runners.BlockJUnit4ClassRunner
Supports @Slow
and
@Stress
supplemental
annotation on test methods to allow for filtering of what class of test to execute.
@Test @To enable / disable the various tests, you have some System properties you can utilize.Slow
public void testLotsOfStuff() { ... do something long and complicated ... } @Test @Stress
("requirements to satisfy this test") public void testUsingLotsOfResources() { ... do something that uses lots of resources ... } @Test public void testSimple() { ... do something that happens quickly ... }
Modifier and Type | Field and Description |
---|---|
private boolean |
slowTestsEnabled |
private boolean |
stressTestsEnabled |
Constructor and Description |
---|
AdvancedRunner(java.lang.Class<?> klass) |
Modifier and Type | Method and Description |
---|---|
private boolean |
isEnabled(java.lang.String key,
boolean def) |
private void |
notify(java.lang.String msg,
org.junit.runner.Description description) |
protected void |
runChild(org.junit.runners.model.FrameworkMethod method,
org.junit.runner.notification.RunNotifier notifier) |
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
private boolean slowTestsEnabled
private boolean stressTestsEnabled
public AdvancedRunner(java.lang.Class<?> klass) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
private boolean isEnabled(java.lang.String key, boolean def)
protected void runChild(org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier notifier)
runChild
in class org.junit.runners.BlockJUnit4ClassRunner
private void notify(java.lang.String msg, org.junit.runner.Description description)