satin.testing
Class TestLogBlock

java.lang.Object
  |
  +--satin.testing.TestLogBlock

public class TestLogBlock
extends java.lang.Object

This class represents a block in a TestLog results file. Blocks can be nested. Each block maintains a number of statistics, including error count, warning count, testcase counts, and elapsed time. You can set tab stops for a particular block.

Author:
Ed Stauff

Field Summary
final java.lang.String name
          The name of the block.
 
Method Summary
final void clearTabs()
          Clears all the tab stops for this block.
final int getErrorCount()
          Returns the error count for this block.
final java.lang.String getLineBreakCharsAfter()
          Returns the set of line break characters for wrapping long lines.
final java.lang.String getLineBreakCharsBefore()
          Returns the set of line break characters for wrapping long lines.
final int getNestingLevel()
          Returns how many levels deep this block is.
final TestLogBlock getParent()
          Returns the parent (enclosing) block, or null if it is the top-level block.
final java.util.Date getStartTime()
          Returns the date and time at which this block was created.
final int[] getTabs()
          Returns the list of tab stops for this block.
final int getTestcaseCount()
          Returns the total number of testcases executed during this block.
final int getTestcaseCount(TestStatus status)
          Returns the number of testcases with the given status executed during this block.
final int getWarningCount()
          Returns the warning count for this block.
final void setLineBreakChars(java.lang.String before, java.lang.String after)
          Sets line break characters for wrapping long lines.
final void setTabs(int[] tabs)
          Sets tab stops for this block.
final void setTabs(int count, int spacing)
          Sets equal tab stops for this block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public final java.lang.String name
The name of the block.
Method Detail

getErrorCount

public final int getErrorCount()
Returns the error count for this block. This is the number of errors reported within this block or any of its children; it does not include errors reported before this block came into existence.

getWarningCount

public final int getWarningCount()
Returns the warning count for this block. This is the number of warnings reported within this block or any of its children; it does not include warnings reported before this block came into existence.

getTestcaseCount

public final int getTestcaseCount()
Returns the total number of testcases executed during this block. This is the number of testcases executed within this block or any of its children; it does not include testcases executed before this block came into existence.

getTestcaseCount

public final int getTestcaseCount(TestStatus status)
Returns the number of testcases with the given status executed during this block. This is the number of testcases executed within this block or any of its children; it does not include testcases executed before this block came into existence.

Parameters:
status
the status of the testcases to be counted.

getStartTime

public final java.util.Date getStartTime()
Returns the date and time at which this block was created.

getParent

public final TestLogBlock getParent()
Returns the parent (enclosing) block, or null if it is the top-level block.

getNestingLevel

public final int getNestingLevel()
Returns how many levels deep this block is. The top-level block has a level of 0.

setTabs

public final void setTabs(int[] tabs)
Sets tab stops for this block. Each tab stop is measured in characters from the left margin of the block; that is, after any indentation. Each tab stop must be greater than the preceding one, or an assertion is thrown. This method discards any previously set tabs stops for this block. If a block does not have tab stops explicitly set, it inherits its tab stops from its parent block. Tabs are expanded to spaces in the actual log file.

Parameters:
tabs
the tab stops.

setTabs

public final void setTabs(int count,
                          int spacing)
Sets equal tab stops for this block. This method discards any previously set tabs stops for this block. If a block does not have tab stops explicitly set, it inherits its tab stops from its parent block. Tabs are expanded to spaces in the actual log file.

Parameters:
count
the number of tab stops to set.
spacing
the spacing between tab stops, in characters

clearTabs

public final void clearTabs()
Clears all the tab stops for this block. The block will inherit its tab stops from its parent.

getTabs

public final int[] getTabs()
Returns the list of tab stops for this block.

setLineBreakChars

public final void setLineBreakChars(java.lang.String before,
                                    java.lang.String after)
Sets line break characters for wrapping long lines.

Parameters:
before
characters to break before.
after
characters to break after.

getLineBreakCharsBefore

public final java.lang.String getLineBreakCharsBefore()
Returns the set of line break characters for wrapping long lines. Line breaks will happen before these characters.

getLineBreakCharsAfter

public final java.lang.String getLineBreakCharsAfter()
Returns the set of line break characters for wrapping long lines. Line breaks will happen after these characters.
Revision History

7/31/01 Ed Stauff - made changes per code review.

5/16/01 Ed Stauff - added new type EXCEPTION.

5/15/01 Ed Stauff - changes per 2nd API review.

3/27/01 Ed Stauff - made changes per API review.

3/22/01 - API reviewed by Test Automation team.



Generated on 5/9/2001 19:37 from TestLogBlock.java (PRIVATE SOURCES)