com.clarkware.junitperf

Class ThreadedTest

public class ThreadedTest extends Object implements Test

The ThreadedTest is a test decorator that runs a test in a separate thread.

Author: Mike Clark Clarkware Consulting, Inc.

Constructor Summary
ThreadedTest(Test test)
Constructs a ThreadedTest to decorate the specified test using the same thread group as the current thread.
ThreadedTest(Test test, ThreadGroup group, ThreadBarrier barrier)
Constructs a ThreadedTest to decorate the specified test using the specified thread group and thread barrier.
Method Summary
intcountTestCases()
Returns the number of test cases in this threaded test.
voidrun(TestResult result)
Runs this test.
StringtoString()
Returns the test description.

Constructor Detail

ThreadedTest

public ThreadedTest(Test test)
Constructs a ThreadedTest to decorate the specified test using the same thread group as the current thread.

Parameters: test Test to decorate.

ThreadedTest

public ThreadedTest(Test test, ThreadGroup group, ThreadBarrier barrier)
Constructs a ThreadedTest 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 Detail

countTestCases

public int countTestCases()
Returns the number of test cases in this threaded test.

Returns: Number of test cases.

run

public void run(TestResult result)
Runs this test.

Parameters: result Test result.

toString

public String toString()
Returns the test description.

Returns: Description.

Copyright B) 1999-2005 Clarkware Consulting, Inc.