public final class TestSuiteBuilder extends Object
Splitable
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.Modifier and Type | Class and Description |
---|---|
class |
TestSuiteBuilder.ParallelEnvironmentTestSuite |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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) |
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()
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 namepublic 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()
Copyright © 2002-2016 Atlassian. All Rights Reserved.