hudson.tasks.junit
Class ClassResult

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.tasks.junit.TestObject
          extended by hudson.tasks.test.TestObject
              extended by hudson.tasks.test.TestResult
                  extended by hudson.tasks.test.TabulatedResult
                      extended by hudson.tasks.junit.ClassResult
All Implemented Interfaces:
ModelObject, SearchableModelObject, SearchItem, Serializable, Comparable<ClassResult>

public final class ClassResult
extends TabulatedResult
implements Comparable<ClassResult>

Cumulative test result of a test class.

Author:
Kohsuke Kawaguchi
See Also:
Serialized Form

Method Summary
 void add(CaseResult r)
           
 int compareTo(ClassResult that)
           
 TestResult findCorrespondingResult(String id)
          Find the test result corresponding to the one identified by id> withint this test result.
 CaseResult getCaseResult(String name)
           
 List<CaseResult> getChildren()
          Gets the child test result objects.
 String getChildTitle()
           
 String getClassName()
           
 String getDisplayName()
           
 float getDuration()
          Time it took to run this test.
 Object getDynamic(String name, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
           
 int getFailCount()
          Gets the total number of failed tests.
 String getFullName()
           
 String getName()
          Gets the name of this object.
 AbstractBuild<?,?> getOwner()
           
 PackageResult getParent()
          Reverse pointer of TabulatedResult.getChildren().
 int getPassCount()
          Gets the total number of passed tests.
 ClassResult getPreviousResult()
          Gets the counter part of this TestResult in the previous run.
 String getRelativePathFrom(TestObject it)
          Gets the relative path to this test case from the given object.
 String getSafeName()
          Gets the version of TestObject.getName() that's URL-safe.
 int getSkipCount()
          Gets the total number of skipped tests.
 String getTitle()
          Gets the human readable title of this result object.
 boolean hasChildren()
           
 void tally()
          Recount my children.
 
Methods inherited from class hudson.tasks.test.TestResult
annotate, getBuildResult, getErrorDetails, getErrorStackTrace, getFailedSince, getFailedSinceRun, getFailedTests, getParentAction, getPassedTests, getResultInBuild, getSkippedTests, getStderr, getStdout, isPassed, setParent, setParentAction, toPrettyString
 
Methods inherited from class hudson.tasks.test.TestObject
doSubmitDescription, getApi, getDescription, getDurationString, getHistory, getId, getSearchUrl, getTestAction, getTestActions, getTestResult, getTestResultAction, getTopLevelTestResult, getTotalCount, getUrl, safe, setDescription, uniquifyName
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getOwner

public AbstractBuild<?,?> getOwner()
Specified by:
getOwner in class TestObject

getParent

public PackageResult getParent()
Description copied from class: TestObject
Reverse pointer of TabulatedResult.getChildren().

Specified by:
getParent in class TestObject

getPreviousResult

public ClassResult getPreviousResult()
Description copied from class: TestResult
Gets the counter part of this TestResult in the previous run.

Overrides:
getPreviousResult in class TestResult
Returns:
null if no such counter part exists.

findCorrespondingResult

public TestResult findCorrespondingResult(String id)
Description copied from class: TestObject
Find the test result corresponding to the one identified by id> withint this test result.

Specified by:
findCorrespondingResult in class TestObject
Parameters:
id - The path to the original test result
Returns:
A corresponding test result, or null if there is no corresponding result.

getTitle

public String getTitle()
Description copied from class: TestResult
Gets the human readable title of this result object.

Overrides:
getTitle in class TestResult

getChildTitle

public String getChildTitle()
Overrides:
getChildTitle in class TabulatedResult

getName

@Exported(visibility=999)
public String getName()
Description copied from class: TestObject
Gets the name of this object.

Overrides:
getName in class TestObject

getSafeName

public String getSafeName()
Description copied from class: TestObject
Gets the version of TestObject.getName() that's URL-safe.

Overrides:
getSafeName in class TestObject

getCaseResult

public CaseResult getCaseResult(String name)

getDynamic

public Object getDynamic(String name,
                         org.kohsuke.stapler.StaplerRequest req,
                         org.kohsuke.stapler.StaplerResponse rsp)
Overrides:
getDynamic in class TestObject

getChildren

@Exported(name="child")
public List<CaseResult> getChildren()
Description copied from class: TabulatedResult
Gets the child test result objects.

Specified by:
getChildren in class TabulatedResult
See Also:
TestObject.getParent()

hasChildren

public boolean hasChildren()
Specified by:
hasChildren in class TabulatedResult

getDuration

public float getDuration()
Description copied from class: TestResult
Time it took to run this test. In seconds.

Overrides:
getDuration in class TestResult

getPassCount

@Exported
public int getPassCount()
Description copied from class: TestResult
Gets the total number of passed tests.

Overrides:
getPassCount in class TestResult

getFailCount

@Exported
public int getFailCount()
Description copied from class: TestResult
Gets the total number of failed tests.

Overrides:
getFailCount in class TestResult

getSkipCount

@Exported
public int getSkipCount()
Description copied from class: TestResult
Gets the total number of skipped tests.

Overrides:
getSkipCount in class TestResult

add

public void add(CaseResult r)

tally

public void tally()
Recount my children.

Overrides:
tally in class TestResult

getClassName

public String getClassName()

compareTo

public int compareTo(ClassResult that)
Specified by:
compareTo in interface Comparable<ClassResult>

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface ModelObject

getFullName

public String getFullName()

getRelativePathFrom

public String getRelativePathFrom(TestObject it)
Gets the relative path to this test case from the given object.

Overrides:
getRelativePathFrom in class TestObject
Returns:
A relative path to this object, potentially from the top of the Hudson object model


Copyright © 2004-2013. All Rights Reserved.