com.atlassian.jira.functest.framework.suite
Class BatcherTransform
java.lang.Object
com.atlassian.jira.functest.framework.suite.BatcherTransform
- All Implemented Interfaces:
- SuiteTransform, com.google.common.base.Function<Iterable<org.junit.runner.Description>,Iterable<org.junit.runner.Description>>
- Direct Known Subclasses:
- SystemPropertyBasedBatcherTransform
public abstract class BatcherTransform
- extends Object
- implements SuiteTransform
A SuiteTransform
for batching tests.
NOTE: this class is stateful, as it has to drill down the description tree to find single test cases to batch. Use
single instance of this class (or any subclass) per transforming runner. It also needs to know about any preceding
transforms that modify the list of descriptions to work correctly.
- Since:
- v4.4
Method Summary |
Iterable<org.junit.runner.Description> |
apply(Iterable<org.junit.runner.Description> input)
|
protected abstract int |
batchNumber()
Batch number to execute. |
protected abstract boolean |
isSplittable(org.junit.runner.Description classTestSuite)
Checks if given description representing class test suite is splittable. |
protected abstract int |
numberOfBatches()
Total number of batches. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.common.base.Function |
equals |
precedingTransforms
protected final Iterable<SuiteTransform> precedingTransforms
BatcherTransform
protected BatcherTransform()
BatcherTransform
protected BatcherTransform(Iterable<SuiteTransform> previousTransforms)
apply
public Iterable<org.junit.runner.Description> apply(@Nullable
Iterable<org.junit.runner.Description> input)
- Specified by:
apply
in interface com.google.common.base.Function<Iterable<org.junit.runner.Description>,Iterable<org.junit.runner.Description>>
batchNumber
protected abstract int batchNumber()
- Batch number to execute.
- Returns:
- batch number
numberOfBatches
protected abstract int numberOfBatches()
Total number of batches.
0 or less means no batching
- Returns:
- total number of batches
isSplittable
protected abstract boolean isSplittable(org.junit.runner.Description classTestSuite)
- Checks if given description representing class test suite is splittable.
- Parameters:
classTestSuite
- suite to check
- Returns:
true
, if the suite is splittable
Copyright © 2002-2013 Atlassian. All Rights Reserved.