Package com.clarkware.junitperf
Class ThreadedTest
java.lang.Object
com.clarkware.junitperf.ThreadedTest
- All Implemented Interfaces:
junit.framework.Test
The
ThreadedTest
is a test decorator that
runs a test in a separate thread.- Author:
- Mike Clark, Clarkware Consulting, Inc.
-
Constructor Summary
ConstructorsConstructorDescriptionThreadedTest
(junit.framework.Test test) Constructs aThreadedTest
to decorate the specified test using the same thread group as the current thread.ThreadedTest
(junit.framework.Test test, ThreadGroup group, ThreadBarrier barrier) Constructs aThreadedTest
to decorate the specified test using the specified thread group and thread barrier. -
Method Summary
-
Constructor Details
-
ThreadedTest
public ThreadedTest(junit.framework.Test test) Constructs aThreadedTest
to decorate the specified test using the same thread group as the current thread.- Parameters:
test
- Test to decorate.
-
ThreadedTest
Constructs aThreadedTest
to decorate the specified test using the specified thread group and thread barrier.- Parameters:
test
- Test to decorate.group
- Thread group.barrier
- Thread barrier.
-
-
Method Details
-
countTestCases
public int countTestCases()Returns the number of test cases in this threaded test.- Specified by:
countTestCases
in interfacejunit.framework.Test
- Returns:
- Number of test cases.
-
run
public void run(junit.framework.TestResult result) Runs this test.- Specified by:
run
in interfacejunit.framework.Test
- Parameters:
result
- Test result.
-
toString
Returns the test description.
-