randoop.experiments
Class CodeCoverageTracker

Object
  extended by CodeCoverageTracker
All Implemented Interfaces:
IEventListener

public class CodeCoverageTracker
extends Object
implements IEventListener


Field Summary
Modifier and Type Field and Description
 Set<Branch> branchesCovered
           
 Map<CoverageAtom,Set<Sequence>> branchesToCoveringSeqs
           
 LinkedList<Class<?>> covClasses
           
 long lastCovIncrease
           
static boolean stats_coverage
           
static int stop_when_plateau
           
 
Constructor Summary
Constructor and Description
CodeCoverageTracker(List<Class<?>> coverageInstrumentedClasses)
          Creates a coverage tracker that tracks the classes specified in the given list.
 
Method Summary
Modifier and Type Method and Description
 void explorationEnd()
          Called immediately after the end of test generation.
 void explorationStart()
          Called immediately at the start of test generation, before any generation steps have occurred.
 void generationStepPost(ExecutableSequence es)
          Called by the AbstractGenerator during each generation iteration, immediately after a generation step() has completed.
 void generationStepPre()
          Called by the AbstractGenerator during each generation iteration, immediately before a generation step() is performed.
 void progressThreadUpdate()
          Called by ProgressDisplay at regular intervals to monitor progress.
 boolean stopGeneration()
          Called by AbstractGenerator to determine if generation should stop.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stop_when_plateau

public static int stop_when_plateau

stats_coverage

public static boolean stats_coverage

covClasses

public final LinkedList<Class<?>> covClasses

branchesToCoveringSeqs

public final Map<CoverageAtom,Set<Sequence>> branchesToCoveringSeqs

branchesCovered

public final Set<Branch> branchesCovered

lastCovIncrease

public long lastCovIncrease
Constructor Detail

CodeCoverageTracker

public CodeCoverageTracker(List<Class<?>> coverageInstrumentedClasses)
Creates a coverage tracker that tracks the classes specified in the given list. The list can be null, which is equivalent to an empty list.

Method Detail

generationStepPre

public void generationStepPre()
Description copied from interface: IEventListener
Called by the AbstractGenerator during each generation iteration, immediately before a generation step() is performed.

Specified by:
generationStepPre in interface IEventListener
See Also:
AbstractGenerator

generationStepPost

public void generationStepPost(ExecutableSequence es)
Description copied from interface: IEventListener
Called by the AbstractGenerator during each generation iteration, immediately after a generation step() has completed.

Specified by:
generationStepPost in interface IEventListener
Parameters:
es - sequence that was generated and executed in the last generation step. Can b null, which means the last step was unable to generate a sequence (e.g. due to a bad random choice).
See Also:
AbstractGenerator

progressThreadUpdate

public void progressThreadUpdate()
Description copied from interface: IEventListener
Called by ProgressDisplay at regular intervals to monitor progress. Implementing classes can use this opportunity to update state.

Specified by:
progressThreadUpdate in interface IEventListener
See Also:
ProgressDisplay

stopGeneration

public boolean stopGeneration()
Description copied from interface: IEventListener
Called by AbstractGenerator to determine if generation should stop. True signals to the generator that generation should stop.

Specified by:
stopGeneration in interface IEventListener
See Also:
AbstractGenerator

explorationEnd

public void explorationEnd()
Description copied from interface: IEventListener
Called immediately after the end of test generation.

Specified by:
explorationEnd in interface IEventListener

explorationStart

public void explorationStart()
Description copied from interface: IEventListener
Called immediately at the start of test generation, before any generation steps have occurred.

Specified by:
explorationStart in interface IEventListener