junit.quilt.framework
Interface CoverageSegment

All Known Subinterfaces:
StatementSegment
All Known Implementing Classes:
CoverageSegmentImpl

public interface CoverageSegment


Method Summary
 java.lang.String getAdvice()
          getAdvice() This method returns a human readable string containing advice on how to cover this segment.
 java.lang.String getDescription()
          getDescription This method returns a description of the segment which is defined by this class.
 int getNumVisits()
          getNumVisits This returns the number of times that this segment has been executed by the code.
 java.util.List getTimes()
          getTimes() This method may return NULL if no timing is done.
 java.lang.String toXML()
          toXML All Coverage Segments are required to output whatever data they have in XML format.
 

Method Detail

getNumVisits

public int getNumVisits()
getNumVisits This returns the number of times that this segment has been executed by the code. This value may be either 0 or 1 if the algorithm cannot collect the number of visits, but can only collect whether it has been visited or not.

toXML

public java.lang.String toXML()
toXML All Coverage Segments are required to output whatever data they have in XML format. The top element should be what type of segment this is. It should include custom information to allow a machine to recreate the segment. It needs to include these elements: NumVisits = Number of Visits Times = Collection of running times (if supported) Advice = Advice on meeting coverage (if supported) Description = Human readable description of this segment.
 
   14
   20
   65
   
      
      
        ...
   
   Execute FooBar.runStuff(a) with a != 1
   Lines 14 - 20 of FooBar.java
 

getTimes

public java.util.List getTimes()
getTimes() This method may return NULL if no timing is done. It may return an empty list if timing is done, but the segment has not been covered. The list returned will have java.lang.Float values.

getAdvice

public java.lang.String getAdvice()
getAdvice() This method returns a human readable string containing advice on how to cover this segment. If good advice is not available, then this should return the description. I hope it can be something like: Run method foo.bar(int a) with a < 0

getDescription

public java.lang.String getDescription()
getDescription This method returns a description of the segment which is defined by this class. This should be similar to: Lines 14 - 20 of FooBar.java


Copyright © 2001-2002 David Dixon-Peugh. All Rights Reserved.