The JUnit Toolbox provides some useful classes for writing automated tests with JUnit.
The JUnit Toolbox provides some useful classes for writing automated tests with JUnit:
- MultithreadingTester -- Helper class for writing stress tests using multiple, concurrently running threads
- PollingWait -- Helper class to wait for asynchronous operations
- ParallelRunner -- Executes all
@Test
methods as well as the calls to@Theory
methods with different parameter assignments concurrently using several worker threads. - ParallelParameterized -- A replacement for the JUnit runner
Parameterized
which executes the tests for each parameter set concurrently. - WildcardPatternSuite -- A replacement for the JUnit runners
Suite
andCategories
, which allows you to specify the children classes of your test suite class using a wildcard pattern. Furthermore you can include and/or exclude multiple categories. - ParallelSuite -- An extension of the
WildcardPatternSuite
, which executes its children classes concurrently using several worker threads. Although it extendsWildcardPatternSuite
you are not forced to use a wildcard pattern, you can also list the children class using the@SuiteClasses
annotation known from JUnit. - InnerTestClassesSuite -- A replacement for the JUnit runner
Enclosed
which executes all inner test classes of the class annotated with@RunWith(InnerTestClassesSuite.class)
. In contrast to theEnclosed
runner provided by JUnit it detects if an inner class is actually a test class and ignores all other inner classes.
ParallelRunner
, ParallelParameterized
, and ParallelSuite
share a common Fork-Join-Pool. You can control the maximum number of worker threads by specifying the system property maxParallelTestThreads
. If this system property is not set, there will be as many worker threads as the number of processors available to the JVM.
More Info : https://github.com/MichaelTamm/junit-toolbox