|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.functest.framework.TestSuiteBuilder
public final class TestSuiteBuilder
Divides up a set of tests such that they can be performed in parallel. It does this by taking a set of tests and dividing them up into composite test of roughly even size.
If a passed test is annotated withSplitable
then its individual test
methods will be broken out into the different tests. All other tests have all their test methods within the same
batch.
Nested Class Summary | |
---|---|
class |
TestSuiteBuilder.ParallelEnvironmentTestSuite
|
Constructor Summary | |
---|---|
TestSuiteBuilder()
Create a no-op splitter, that is, the passed tests will not be batched. |
|
TestSuiteBuilder(int batch,
int maxBatch)
Create a splitter that will return the given batch from the specified number of total batches. |
Method Summary | |
---|---|
TestSuiteBuilder |
addSingleTestMethod(Class<? extends junit.framework.TestCase> testClass,
String methodName)
Adds an individual test method to the suite. |
TestSuiteBuilder |
addTest(Class<? extends junit.framework.TestCase> test)
|
TestSuiteBuilder |
addTests(Class<? extends junit.framework.TestCase>... tests)
|
TestSuiteBuilder |
addTests(Collection<Class<? extends junit.framework.TestCase>> tests)
Add the passed tests to the splitter for division. |
TestSuiteBuilder |
batch(int batch)
|
junit.framework.Test |
build()
Create the composite test that represents the batch. |
TestSuiteBuilder |
log(boolean log)
|
TestSuiteBuilder |
maxBatch(int maxBatch)
|
TestSuiteBuilder |
parallel(boolean parallel)
|
String |
toString()
|
TestSuiteBuilder |
watch(long timeout,
long delay,
TimeUnit unit,
Class<? extends junit.framework.Test>... classes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TestSuiteBuilder(int batch, int maxBatch)
batch
- the batch the splitter should return. A value of -1 can be specified when maxBatch is also passed
-1. This indicates that no batching should be performed.maxBatch
- the number of batches that splitter should divide the tests into. A value of -1 can be specified
when batch is also passed -1. This indicates that no batching should be performed.public TestSuiteBuilder()
Method Detail |
---|
public TestSuiteBuilder addTests(Collection<Class<? extends junit.framework.TestCase>> tests)
tests
- the set of tests to divide.
public TestSuiteBuilder addTests(Class<? extends junit.framework.TestCase>... tests)
public TestSuiteBuilder addTest(Class<? extends junit.framework.TestCase> test)
public TestSuiteBuilder addSingleTestMethod(Class<? extends junit.framework.TestCase> testClass, String methodName)
testClass
- the TestCase classmethodName
- method name
public TestSuiteBuilder log(boolean log)
public TestSuiteBuilder batch(int batch)
public TestSuiteBuilder maxBatch(int maxBatch)
public TestSuiteBuilder parallel(boolean parallel)
public TestSuiteBuilder watch(long timeout, long delay, TimeUnit unit, Class<? extends junit.framework.Test>... classes)
public junit.framework.Test build()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |