public class ParallelRunner
extends org.junit.experimental.theories.Theories
Theories
runner, which executes
all @Test
methods concurrently. Furthermore all calls
to @Theory
methods with different parameter assignments
are executes concurrently too. Example:@RunWith(ParallelRunner.class) public class FooTest { @Test public void test1() { // Will be executed in a worker thread } @Test public void test2() { // Will be executed concurrently in another worker thread } }You can specify the maximum number of parallel test threads using the system property
maxParallelTestThreads
.
If this system property is not specified, the maximum
number of test threads will be the number of
available processors.
Modifier and Type | Class and Description |
---|---|
class |
ParallelRunner.ParallelTheoryAnchor |
Constructor and Description |
---|
ParallelRunner(Class<?> klass) |
Modifier and Type | Method and Description |
---|---|
org.junit.runners.model.Statement |
methodBlock(org.junit.runners.model.FrameworkMethod method) |
collectInitializationErrors, computeTestMethods, validateConstructor, validateTestMethods
createTest, describeChild, getChildren, getTestRules, isIgnored, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
public ParallelRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
Copyright © 2017. All rights reserved.