All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.junittoolbox.ParallelRunner Maven / Gradle / Ivy

There is a newer version: 2.4
Show newest version
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