Questions tagged [junit-toolbox]

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 and Categories, 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 extends WildcardPatternSuite 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 the Enclosed 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

4 questions
6
votes
2 answers

Using JUnit-Tools 1.1.0 to generate automatic test cases gives me "select a test-project"

I installed JUnit-Tools 1.1.0 in eclipse market. As per the documentation, they want the test-projects and the mock-projects to be created manually. My class structure is like below : I tried creating a test package like…
Preethi Rajaraman
  • 363
  • 1
  • 8
  • 18
2
votes
1 answer

Spring doesn't autowire fields when runner invokes '@Before' method

I have following test: @RunWith(Parameterized.class) @SpringBootTest @ContextConfiguration(classes = MyConfig.class) public class OrderPlacementCancelTest { @Autowired private TestSessionsHolderPerf sessionsHolder; @ClassRule public…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
1
vote
1 answer

ParallelRunner : java.lang.IllegalArgumentException: The test method of the supplied TestContext must not be null

I have following test: @Test public void test() throws Exception { Class[] cls = {OrderPlacementCancelTest.class}; Result result = JUnitCore.runClasses(new ParallelComputer(false, true), cls); logger.info("Failure…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
1
vote
0 answers

How to get test execution report after JUnitCore.runClasses

I have following code to start my class methods in parallel: @Test public void test() throws Exception { Class[] cls = {OrderPlacementCancelTest.class}; Result result = JUnitCore.runClasses(new ParallelComputer(false, true), cls); } I…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710