
com.googlecode.junittoolbox.ParallelRunner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of junit-toolbox Show documentation
Show all versions of junit-toolbox Show documentation
Useful classes for writing automated tests with JUnit
package com.googlecode.junittoolbox;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.InitializationError;
/**
* An extension of the JUnit {@link BlockJUnit4ClassRunner} – the default
* runner for JUnit 4 test classes – which executes the test methods of
* the test class concurrently, if you annotate it like this:
* @RunWith(ParallelRunner.class)
* public class FooTest {
* ...
* }
*
* 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
* {@link Runtime#availableProcessors() available processors.}
*/
public class ParallelRunner extends BlockJUnit4ClassRunner {
public ParallelRunner(final Class> klass) throws InitializationError {
super(klass);
setScheduler(new ParallelScheduler());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy