net.sf.jameleon.result
Class TestResultWithChildren

java.lang.Object
  extended by net.sf.jameleon.result.JameleonTestResult
      extended by net.sf.jameleon.result.TestResultWithChildren
All Implemented Interfaces:
Serializable, HasChildResults, XMLable, LocationAware
Direct Known Subclasses:
DataDrivableResultContainer, DataDrivableRowResult, SessionResult, TestCaseResult

public abstract class TestResultWithChildren
extends JameleonTestResult
implements HasChildResults

A JameleonTestResult that can have children

See Also:
Serialized Form

Field Summary
protected  List childrenResults
          A list of Child Results
protected  List failedResults
          A list of failed Child Results
 
Fields inherited from class net.sf.jameleon.result.JameleonTestResult
columnNumber, E_CDATA, elementTagName, error, errorFile, executionTime, failed, lineNumber, parentResults, S_CDATA, scriptFileName, tag
 
Constructor Summary
TestResultWithChildren()
           
TestResultWithChildren(FunctionalPoint tag)
           
TestResultWithChildren(FunctionalPoint tag, HasChildResults parentResults)
           
 
Method Summary
 void addChildResult(JameleonTestResult childResult)
          Adds a JameleonTestResult to the list of JameleonTestResult int the TestCase
 void addFailedResult(JameleonTestResult failedResult)
          Adds a failed JameleonTestResult to the list of failed results
 void destroy()
           
 List getAllChildrenResults()
          Gets all the ancestor children results
 List getAllFailedLeafChildrenResults()
          Gets all the ancestor leaf children results that have failed
 List getChildrenResults()
          Gets a list of child results
protected  List getCountableChildResults()
           
 List getCountableResults()
          Gets all the countable ancestor children results that can be counted as test case results
 List getFailedCountableResults()
          Gets all the failed ancestor children results that can be counted as test case results
 List getFailedResults()
          Gets a list of failed child results
 boolean hasChildren()
          Tells whether this result has children or not.
 boolean isParent()
          Tells whether this result is a parent result or not.
 String toXML()
          Implement this method the same way the toString method would be implemented, except the object's information should be in a valid XML format.
 
Methods inherited from class net.sf.jameleon.result.JameleonTestResult
copyLocationAwareProperties, equals, escapeXML, failed, findAncestorByClass, getColumnNumber, getDateTimeExecuted, getElementName, getError, getErrorFile, getErrorMsg, getExecutionTime, getExecutionTimeToDisplay, getFailedRowNum, getFileName, getHtmlFormattedErrorMsg, getHtmlFormattedStackTrace, getIdentifier, getLineNumber, getOutcome, getParentResults, getTag, hashCode, isA, isDataDriven, passed, recordFailureToCountableResult, setColumnNumber, setDateTimeExecuted, setElementName, setError, setErrorFile, setExecutionTime, setFailed, setFileName, setLineNumber, setParentResults, setTag, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.jameleon.result.HasChildResults
setFailed
 

Field Detail

childrenResults

protected List childrenResults
A list of Child Results


failedResults

protected List failedResults
A list of failed Child Results

Constructor Detail

TestResultWithChildren

public TestResultWithChildren()

TestResultWithChildren

public TestResultWithChildren(FunctionalPoint tag)

TestResultWithChildren

public TestResultWithChildren(FunctionalPoint tag,
                              HasChildResults parentResults)
Method Detail

addChildResult

public void addChildResult(JameleonTestResult childResult)
Adds a JameleonTestResult to the list of JameleonTestResult int the TestCase

Specified by:
addChildResult in interface HasChildResults
Parameters:
childResult - - a child result

addFailedResult

public void addFailedResult(JameleonTestResult failedResult)
Adds a failed JameleonTestResult to the list of failed results

Specified by:
addFailedResult in interface HasChildResults
Parameters:
failedResult - - A failed child result

getAllChildrenResults

public List getAllChildrenResults()
Gets all the ancestor children results

Specified by:
getAllChildrenResults in interface HasChildResults
Returns:
List

getAllFailedLeafChildrenResults

public List getAllFailedLeafChildrenResults()
Gets all the ancestor leaf children results that have failed

Specified by:
getAllFailedLeafChildrenResults in interface HasChildResults
Returns:
List

getCountableResults

public List getCountableResults()
Gets all the countable ancestor children results that can be counted as test case results

Specified by:
getCountableResults in interface HasChildResults
Returns:
List

getCountableChildResults

protected List getCountableChildResults()

getFailedCountableResults

public List getFailedCountableResults()
Gets all the failed ancestor children results that can be counted as test case results

Specified by:
getFailedCountableResults in interface HasChildResults
Returns:
List

getChildrenResults

public List getChildrenResults()
Gets a list of child results

Specified by:
getChildrenResults in interface HasChildResults
Returns:
a list of child results

getFailedResults

public List getFailedResults()
Gets a list of failed child results

Specified by:
getFailedResults in interface HasChildResults
Returns:
a list of failed child results

destroy

public void destroy()
Overrides:
destroy in class JameleonTestResult

isParent

public boolean isParent()
Description copied from class: JameleonTestResult
Tells whether this result is a parent result or not.

Specified by:
isParent in class JameleonTestResult
Returns:
true if this result is a parent result or false if it is a leaf node result

toXML

public String toXML()
Description copied from interface: XMLable
Implement this method the same way the toString method would be implemented, except the object's information should be in a valid XML format.

Specified by:
toXML in interface XMLable
Overrides:
toXML in class JameleonTestResult
Returns:
an XML representation of the results

hasChildren

public boolean hasChildren()
Description copied from class: JameleonTestResult
Tells whether this result has children or not.

Specified by:
hasChildren in class JameleonTestResult
Returns:
true if this result has children


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.