|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.extensions.TestDecorator
org.apache.qpid.junit.extensions.WrappedSuiteTestDecorator
org.apache.qpid.junit.extensions.ScaledTestDecorator
public class ScaledTestDecorator
A test decorator that runs a test many times simultaneously in many threads.
Responsibilities | Collaborations |
---|---|
Clone a test run into many threads and run them simultaneously. | |
Inform the test results of the start and end of each concurrent test batch. | TKTestResult
|
Inform the test results of the concurrency level. | TKTestResult
|
Field Summary |
---|
Fields inherited from class org.apache.qpid.junit.extensions.WrappedSuiteTestDecorator |
---|
suite |
Fields inherited from class junit.extensions.TestDecorator |
---|
fTest |
Constructor Summary | |
---|---|
ScaledTestDecorator(WrappedSuiteTestDecorator test)
Creates an active test with default multiplier (1). |
|
ScaledTestDecorator(WrappedSuiteTestDecorator test,
int numThreads)
Creates a concurrently scaled test with the specified number of threads. |
|
ScaledTestDecorator(WrappedSuiteTestDecorator test,
int[] threads)
Creates a concurrently scaled test with the specified thread levels, the test is repeated at each level. |
Method Summary | |
---|---|
int |
getConcurrencyLevel()
Reports the number of tests that the scaled decorator is currently running concurrently. |
Thread |
getShutdownHook()
Supplies the shut-down hook. |
void |
run(junit.framework.TestResult testResult)
Runs the test simultaneously in at the specified concurrency levels. |
String |
toString()
Prints a string summarizing this test decorator, mainly for debugging purposes. |
Methods inherited from class org.apache.qpid.junit.extensions.WrappedSuiteTestDecorator |
---|
countTestCases, getAllUnderlyingTests, testAt |
Methods inherited from class junit.extensions.TestDecorator |
---|
basicRun, getTest |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ScaledTestDecorator(WrappedSuiteTestDecorator test)
test
- The target test.public ScaledTestDecorator(WrappedSuiteTestDecorator test, int numThreads)
test
- The target test.numThreads
- The stress level.public ScaledTestDecorator(WrappedSuiteTestDecorator test, int[] threads)
test
- The target test.threads
- The concurrency levels.Method Detail |
---|
public void run(junit.framework.TestResult testResult)
run
in interface junit.framework.Test
run
in class junit.extensions.TestDecorator
testResult
- The results object to monitor the test results with.public int getConcurrencyLevel()
public Thread getShutdownHook()
getShutdownHook
in interface ShutdownHookable
public String toString()
toString
in class junit.extensions.TestDecorator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |