com.cwctravel.hudson.plugins.suitegroupedtests.junit
Class SuiteGroupResult

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.test.MetaTabulatedResult
                          extended by com.cwctravel.hudson.plugins.suitegroupedtests.junit.SuiteGroupResult
All Implemented Interfaces:
hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem, java.io.Serializable

public class SuiteGroupResult
extends hudson.tasks.test.MetaTabulatedResult

See Also:
Serialized Form

Field Summary
protected  java.util.Collection<TestResult> allFailedTests
           
protected  java.util.Collection<TestResult> allPassedTests
           
protected  java.util.Collection<TestResult> allSkippedTests
           
protected  boolean cacheDirty
           
protected  java.util.Map<java.lang.String,TestResult> childrenBySuiteName
           
protected  java.lang.String description
           
protected  float duration
           
protected  int failCount
           
protected  java.util.Map<java.lang.String,java.util.Collection<TestResult>> failedTestsBySuiteName
           
protected  java.lang.String groupId
          Effectively overrides TestObject.id, by overriding the accessors
protected  boolean keepLongStdio
           
protected  SuiteGroupResultAction parentAction
           
protected  int passCount
           
protected  java.util.Map<java.lang.String,java.util.Collection<TestResult>> passedTestsBySuiteName
           
protected  int skipCount
           
protected  java.util.Map<java.lang.String,java.util.Collection<TestResult>> skippedTestsBySuiteName
           
protected  int totalCount
           
 
Constructor Summary
SuiteGroupResult()
           
SuiteGroupResult(java.lang.String description, long buildTime, org.apache.tools.ant.DirectoryScanner ds, boolean keepLongStdio)
           
 
Method Summary
 void addTestResult(java.lang.String suiteName, TestResult result)
           
 hudson.tasks.test.TestResult findCorrespondingResult(java.lang.String id)
           
 void freeze(SuiteGroupResultAction action)
           
 java.util.Collection<? extends TestResult> getChildren()
           
 java.lang.String getChildTitle()
           
 java.lang.String getDescription()
           
 java.lang.String getDisplayName()
           
 float getDuration()
           
 java.lang.Object getDynamic(java.lang.String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
           
 int getFailCount()
          Gets the number of failed tests.
 int getFailDiff()
           
 int getFailedSince()
           
 hudson.model.Run<?,?> getFailedSinceRun()
           
 java.util.Collection<? extends TestResult> getFailedTests()
           
 TestResult getGroupBySuiteName(java.lang.String suiteName)
           
 java.util.Collection<TestResult> getGroups()
           
 hudson.tasks.junit.History getHistory()
           
 java.lang.String getName()
           
 hudson.model.AbstractBuild<?,?> getOwner()
           
 hudson.tasks.test.TestObject getParent()
          Strange API.
 int getPassCount()
          Gets the number of passed tests.
 int getPassDiff()
           
 java.util.Collection<? extends TestResult> getPassedTests()
           
 SuiteGroupResult getPreviousResult()
           
 hudson.tasks.test.TestResult getResultInBuild(hudson.model.AbstractBuild<?,?> build)
           
 java.lang.String getRootUrl(java.lang.String urlName)
           
 java.lang.String getRootUrl(hudson.tasks.junit.TestAction testAction)
           
 int getSkipCount()
          Gets the total number of skipped tests
 int getSkipDiff()
           
 java.util.Collection<? extends TestResult> getSkippedTests()
           
 java.util.Collection<java.lang.String> getSuiteNames()
          The list of suiteNames currently in use by the children
 java.util.List<hudson.tasks.junit.TestAction> getTestActions()
           
 SuiteGroupResultAction getTestResultAction()
           
 java.lang.String getTitle()
           
 hudson.tasks.test.TestResult getTopLevelTestResult()
           
 int getTotalDiff()
           
 boolean hasChildren()
           
 boolean isPassed()
           
 void parse(java.io.File reportFile)
           
 void parse(long buildTime, org.apache.tools.ant.DirectoryScanner results)
          Collect reports from the given DirectoryScanner, while filtering out all files that were created before the given time.
 void setDescription(java.lang.String description)
           
 void setParentAction(SuiteGroupResultAction parentAction)
           
 void tally()
           
 java.lang.String toPrettyString()
           
 
Methods inherited from class hudson.tasks.test.TestResult
annotate, getBuildResult, getErrorDetails, getErrorStackTrace, getParentAction, getStderr, getStdout, setParent, setParentAction
 
Methods inherited from class hudson.tasks.test.TestObject
doSubmitDescription, getApi, getDurationString, getId, getRelativePathFrom, getSafeName, getSearchUrl, getTestAction, getTestResult, getTotalCount, getUrl, safe, 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
 

Field Detail

childrenBySuiteName

protected final java.util.Map<java.lang.String,TestResult> childrenBySuiteName

failedTestsBySuiteName

protected transient java.util.Map<java.lang.String,java.util.Collection<TestResult>> failedTestsBySuiteName

passedTestsBySuiteName

protected transient java.util.Map<java.lang.String,java.util.Collection<TestResult>> passedTestsBySuiteName

skippedTestsBySuiteName

protected transient java.util.Map<java.lang.String,java.util.Collection<TestResult>> skippedTestsBySuiteName

allFailedTests

protected transient java.util.Collection<TestResult> allFailedTests

allPassedTests

protected transient java.util.Collection<TestResult> allPassedTests

allSkippedTests

protected transient java.util.Collection<TestResult> allSkippedTests

keepLongStdio

protected final boolean keepLongStdio

failCount

protected int failCount

skipCount

protected int skipCount

passCount

protected int passCount

totalCount

protected int totalCount

duration

protected float duration

cacheDirty

protected transient boolean cacheDirty

parentAction

protected transient SuiteGroupResultAction parentAction

description

protected java.lang.String description

groupId

protected java.lang.String groupId
Effectively overrides TestObject.id, by overriding the accessors

Constructor Detail

SuiteGroupResult

public SuiteGroupResult()

SuiteGroupResult

public SuiteGroupResult(java.lang.String description,
                        long buildTime,
                        org.apache.tools.ant.DirectoryScanner ds,
                        boolean keepLongStdio)
                 throws java.io.IOException
Throws:
java.io.IOException
Method Detail

tally

public void tally()
Overrides:
tally in class hudson.tasks.test.TestResult

getSuiteNames

public java.util.Collection<java.lang.String> getSuiteNames()
The list of suiteNames currently in use by the children

Returns:

getGroups

@Exported(inline=true,
          visibility=99)
public java.util.Collection<TestResult> getGroups()

getGroupBySuiteName

public TestResult getGroupBySuiteName(java.lang.String suiteName)

getTestResultAction

public SuiteGroupResultAction getTestResultAction()
Overrides:
getTestResultAction in class hudson.tasks.test.TestObject

getTestActions

public java.util.List<hudson.tasks.junit.TestAction> getTestActions()
Overrides:
getTestActions in class hudson.tasks.test.TestObject

setParentAction

public void setParentAction(SuiteGroupResultAction parentAction)

addTestResult

public void addTestResult(java.lang.String suiteName,
                          TestResult result)

getTitle

public java.lang.String getTitle()
Overrides:
getTitle in class hudson.tasks.test.TestResult

getName

public java.lang.String getName()
Overrides:
getName in class hudson.tasks.test.TestObject

isPassed

public boolean isPassed()
Overrides:
isPassed in class hudson.tasks.test.TestResult

getChildTitle

public java.lang.String getChildTitle()
Overrides:
getChildTitle in class hudson.tasks.test.TabulatedResult

getPreviousResult

public SuiteGroupResult getPreviousResult()
Overrides:
getPreviousResult in class hudson.tasks.test.TestResult

getPassDiff

public int getPassDiff()

getSkipDiff

public int getSkipDiff()

getFailDiff

public int getFailDiff()

getTotalDiff

public int getTotalDiff()

getResultInBuild

public hudson.tasks.test.TestResult getResultInBuild(hudson.model.AbstractBuild<?,?> build)
Overrides:
getResultInBuild in class hudson.tasks.test.TestResult

findCorrespondingResult

public hudson.tasks.test.TestResult findCorrespondingResult(java.lang.String id)
Specified by:
findCorrespondingResult in class hudson.tasks.test.TestObject

getFailedSince

public int getFailedSince()
Overrides:
getFailedSince in class hudson.tasks.test.TestResult

getFailedSinceRun

public hudson.model.Run<?,?> getFailedSinceRun()
Overrides:
getFailedSinceRun in class hudson.tasks.test.TestResult

getFailCount

@Exported(visibility=99)
public int getFailCount()
Gets the number of failed tests.

Overrides:
getFailCount in class hudson.tasks.test.TestResult

getSkipCount

@Exported(visibility=99)
public int getSkipCount()
Gets the total number of skipped tests

Overrides:
getSkipCount in class hudson.tasks.test.TestResult
Returns:

getPassCount

@Exported(visibility=99)
public int getPassCount()
Gets the number of passed tests.

Overrides:
getPassCount in class hudson.tasks.test.TestResult

getFailedTests

public java.util.Collection<? extends TestResult> getFailedTests()
Specified by:
getFailedTests in class hudson.tasks.test.MetaTabulatedResult

getSkippedTests

public java.util.Collection<? extends TestResult> getSkippedTests()
Overrides:
getSkippedTests in class hudson.tasks.test.TestResult

getPassedTests

public java.util.Collection<? extends TestResult> getPassedTests()
Overrides:
getPassedTests in class hudson.tasks.test.TestResult

getChildren

public java.util.Collection<? extends TestResult> getChildren()
Specified by:
getChildren in class hudson.tasks.test.TabulatedResult

hasChildren

public boolean hasChildren()
Specified by:
hasChildren in class hudson.tasks.test.TabulatedResult

getOwner

public hudson.model.AbstractBuild<?,?> getOwner()
Specified by:
getOwner in class hudson.tasks.test.TestObject

getParent

public hudson.tasks.test.TestObject getParent()
Strange API. A LabeledTestResultGroup is always the direct child of an action, so we'll just return null here, for the parent. This is the same behavior as TestResult.

Overrides:
getParent in class hudson.tasks.test.TestObject
Returns:

getDuration

@Exported(visibility=99)
public float getDuration()
Overrides:
getDuration in class hudson.tasks.test.TestResult

getDisplayName

@Exported(visibility=99)
public java.lang.String getDisplayName()

getDescription

@Exported(visibility=99)
public java.lang.String getDescription()
Overrides:
getDescription in class hudson.tasks.test.TestObject

setDescription

public void setDescription(java.lang.String description)
Overrides:
setDescription in class hudson.tasks.test.TestObject

getDynamic

public java.lang.Object getDynamic(java.lang.String token,
                                   org.kohsuke.stapler.StaplerRequest req,
                                   org.kohsuke.stapler.StaplerResponse rsp)
Overrides:
getDynamic in class hudson.tasks.test.TestObject

toPrettyString

public java.lang.String toPrettyString()
Overrides:
toPrettyString in class hudson.tasks.test.TestResult

parse

public void parse(long buildTime,
                  org.apache.tools.ant.DirectoryScanner results)
           throws java.io.IOException
Collect reports from the given DirectoryScanner, while filtering out all files that were created before the given time.

Throws:
java.io.IOException

parse

public void parse(java.io.File reportFile)
           throws java.io.IOException
Throws:
java.io.IOException

freeze

public void freeze(SuiteGroupResultAction action)

getTopLevelTestResult

public hudson.tasks.test.TestResult getTopLevelTestResult()
Overrides:
getTopLevelTestResult in class hudson.tasks.test.TestObject

getHistory

public hudson.tasks.junit.History getHistory()
Overrides:
getHistory in class hudson.tasks.test.TestObject

getRootUrl

public java.lang.String getRootUrl(java.lang.String urlName)

getRootUrl

public java.lang.String getRootUrl(hudson.tasks.junit.TestAction testAction)


Copyright © 2004-2012. All Rights Reserved.