com.atlassian.confluence.testbatching
Class WeightedTestBatchingStrategy

java.lang.Object
  extended by com.atlassian.confluence.testbatching.WeightedTestBatchingStrategy
All Implemented Interfaces:
TestBatchingStrategy

public class WeightedTestBatchingStrategy
extends java.lang.Object
implements TestBatchingStrategy

An implementation of TestBatchingStrategy which partitions the tests based on the calculated "weight" of each test class, trying to keep the total weight in each partition as even as possible. A TestWeightCalculator is used to calculate the weight of individual test classes.


Constructor Summary
WeightedTestBatchingStrategy(TestWeightCalculator testWeightCalculator)
           
 
Method Summary
 java.util.List<java.util.List<java.lang.Class<?>>> partitionTests(java.util.List<java.lang.Class<?>> testClasses, int numberOfPartitions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeightedTestBatchingStrategy

public WeightedTestBatchingStrategy(TestWeightCalculator testWeightCalculator)
Method Detail

partitionTests

public java.util.List<java.util.List<java.lang.Class<?>>> partitionTests(java.util.List<java.lang.Class<?>> testClasses,
                                                                         int numberOfPartitions)
Specified by:
partitionTests in interface TestBatchingStrategy


Copyright © 2003-2014 Atlassian. All Rights Reserved.