com.google.gwt.junit
Class BatchingStrategy

java.lang.Object
  extended by com.google.gwt.junit.BatchingStrategy

public abstract class BatchingStrategy
extends java.lang.Object

An interface that specifies how tests should be batched. A single batch should never include tests from more than one module, or the browser will load the new module and lose results from existing tests.


Constructor Summary
BatchingStrategy()
           
 
Method Summary
abstract  java.util.List<JUnitHost.TestInfo[]> getTestBlocks(java.lang.String syntheticModuleName)
          Returns an ordered list of all tests blocks that should be executed for the specified module.
abstract  boolean isSingleTestOnly()
          Check if this batching strategy only supports execution of a single test at a time.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchingStrategy

public BatchingStrategy()
Method Detail

getTestBlocks

public abstract java.util.List<JUnitHost.TestInfo[]> getTestBlocks(java.lang.String syntheticModuleName)
Returns an ordered list of all tests blocks that should be executed for the specified module. Each test block is an array of JUnitHost.TestInfo.

Parameters:
syntheticModuleName - the name of the synthetic module
Returns:
an ordered list of test blocks to run

isSingleTestOnly

public abstract boolean isSingleTestOnly()
Check if this batching strategy only supports execution of a single test at a time. If this method returns true, test methods will be executed on the client as they are run by JUnit. If it returns false, test methods will be batched and sent to the clients in groups. If you are using a test runner that shards test methods across multiple clients, you should use a strategy that returns false (such as NoBatchingStrategy) or all tests will be executed on all clients.

Returns:
true if batches never contain more than one test