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
@Testmethods as well as the calls to@Theorymethods with different parameter assignments concurrently using several worker threads. - ParallelParameterized -- A replacement for the JUnit runner
Parameterizedwhich executes the tests for each parameter set concurrently. - WildcardPatternSuite -- A replacement for the JUnit runners
SuiteandCategories, 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 extendsWildcardPatternSuiteyou are not forced to use a wildcard pattern, you can also list the children class using the@SuiteClassesannotation known from JUnit. - InnerTestClassesSuite -- A replacement for the JUnit runner
Enclosedwhich executes all inner test classes of the class annotated with@RunWith(InnerTestClassesSuite.class). In contrast to theEnclosedrunner 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