hudson.plugins.robot.model
Class RobotSuiteResult

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.plugins.robot.model.RobotTestObject
          extended by hudson.plugins.robot.model.RobotSuiteResult
All Implemented Interfaces:
hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem, Serializable

public class RobotSuiteResult
extends RobotTestObject

See Also:
Serialized Form

Field Summary
 
Fields inherited from class hudson.plugins.robot.model.RobotTestObject
duration
 
Constructor Summary
RobotSuiteResult()
           
 
Method Summary
 void addCaseResult(RobotCaseResult caseResult)
          Adds a test case result to this suite.
 void addCaseResults(Collection<RobotCaseResult> newCaseResults)
          If cases with same name exist, the originals are kept
 void addChild(RobotSuiteResult child)
          Adds a nested suite to this suite.
 void addChildren(Collection<RobotSuiteResult> childSuites)
          If suites with same name exist, the originals are kept
 void doDurationGraph(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Return duration graph for the suite in the request.
 void doGraph(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Return robot trend graph in the request.
 void failTeardown()
          Fail all cases because of teardown failure.
 RobotTestObject findObjectById(String id)
          Get object by path in tree
 List<RobotCaseResult> getAllCases()
          Get all cases in this suite and its child suites
 List<RobotSuiteResult> getAllChildSuites()
          Get all children of this suite
 List<RobotCaseResult> getAllFailedCases()
          Get all failed cases in this suite and its child suites
 RobotCaseResult getCase(String name)
          Get case result by duplicate safe unencoded name
 Collection<RobotCaseResult> getCaseResults()
          Get all case results belonging to this suite
 Collection<RobotSuiteResult> getChildSuites()
          Get the immediate child suites of this suite
 int getCriticalFailed()
          Get number of failed critical tests
 int getCriticalPassed()
          Get number of passed critical tests
 int getCriticalTotal()
          Get number of all critical tests
 String getDisplayName()
           
 Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerRequest rsp)
          Get suite or case result by url encoded name
 int getFailed()
          Get number of all failed tests
 String getName()
          Get the name of this suite
 RobotTestObject getParent()
          Get the parent object of this suite in tree
 int getPassed()
          Get number of all passed tests
 RobotSuiteResult getPreviousResult()
          
 String getSearchUrl()
           
 RobotSuiteResult getSuite(String name)
          Get nested suite result by duplicate safe unencoded name
 int getTotal()
          Get number of all tests
 void setName(String name)
           
 void setParent(RobotTestObject parent)
           
 void tally(RobotBuildAction parentAction)
          Count total values from children and set same parentaction to all
 
Methods inherited from class hudson.plugins.robot.model.RobotTestObject
getDuplicateSafeName, getDuration, getDurationDiff, getHumanReadableDuration, getOldFormatName, getOwner, getParentAction, getRelativeId, getRelativePackageName, getResultInBuild, isNeedToGenerate, setDuplicateSafeName, setParentAction, urlDecode, urlEncode
 
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
 

Constructor Detail

RobotSuiteResult

public RobotSuiteResult()
Method Detail

addChild

public void addChild(RobotSuiteResult child)
Adds a nested suite to this suite. If a suite exists with the same name it will be overwritten with this one.

Parameters:
child -

getChildSuites

public Collection<RobotSuiteResult> getChildSuites()
Get the immediate child suites of this suite

Returns:

getParent

public RobotTestObject getParent()
Get the parent object of this suite in tree

Specified by:
getParent in class RobotTestObject

setParent

public void setParent(RobotTestObject parent)

getName

public String getName()
Get the name of this suite

Specified by:
getName in class RobotTestObject

setName

public void setName(String name)

getCaseResults

public Collection<RobotCaseResult> getCaseResults()
Get all case results belonging to this suite

Returns:

getFailed

public int getFailed()
Get number of all failed tests

Specified by:
getFailed in class RobotTestObject
Returns:

getPassed

public int getPassed()
Get number of all passed tests

Specified by:
getPassed in class RobotTestObject
Returns:

getTotal

public int getTotal()
Get number of all tests

Returns:

getCriticalPassed

public int getCriticalPassed()
Get number of passed critical tests

Returns:

getCriticalFailed

public int getCriticalFailed()
Get number of failed critical tests

Returns:

getCriticalTotal

public int getCriticalTotal()
Get number of all critical tests

Returns:

addCaseResult

public void addCaseResult(RobotCaseResult caseResult)
Adds a test case result to this suite. If a case exists with the same name it will be overwritten with this one.

Parameters:
caseResult -

getDisplayName

public String getDisplayName()

getSearchUrl

public String getSearchUrl()

getSuite

public RobotSuiteResult getSuite(String name)
Get nested suite result by duplicate safe unencoded name

Parameters:
name -
Returns:
suite result, null if none found

getCase

public RobotCaseResult getCase(String name)
Get case result by duplicate safe unencoded name

Parameters:
name -
Returns:
case result, null if none found

getPreviousResult

public RobotSuiteResult getPreviousResult()

Specified by:
getPreviousResult in class RobotTestObject

getDynamic

public Object getDynamic(String token,
                         org.kohsuke.stapler.StaplerRequest req,
                         org.kohsuke.stapler.StaplerRequest rsp)
Get suite or case result by url encoded name

Parameters:
token -
req -
rsp -
Returns:

getAllChildSuites

public List<RobotSuiteResult> getAllChildSuites()
Get all children of this suite

Returns:

getAllFailedCases

public List<RobotCaseResult> getAllFailedCases()
Get all failed cases in this suite and its child suites

Returns:

getAllCases

public List<RobotCaseResult> getAllCases()
Get all cases in this suite and its child suites

Returns:

failTeardown

public void failTeardown()
Fail all cases because of teardown failure.


tally

public void tally(RobotBuildAction parentAction)
Count total values from children and set same parentaction to all

Parameters:
parentAction -

findObjectById

public RobotTestObject findObjectById(String id)
Get object by path in tree

Parameters:
id -
Returns:

doGraph

public void doGraph(org.kohsuke.stapler.StaplerRequest req,
                    org.kohsuke.stapler.StaplerResponse rsp)
             throws IOException
Return robot trend graph in the request.

Parameters:
req -
rsp -
Throws:
IOException

doDurationGraph

public void doDurationGraph(org.kohsuke.stapler.StaplerRequest req,
                            org.kohsuke.stapler.StaplerResponse rsp)
                     throws IOException
Return duration graph for the suite in the request.

Parameters:
req -
rsp -
Throws:
IOException

addChildren

public void addChildren(Collection<RobotSuiteResult> childSuites)
If suites with same name exist, the originals are kept

Parameters:
childSuites -

addCaseResults

public void addCaseResults(Collection<RobotCaseResult> newCaseResults)
If cases with same name exist, the originals are kept

Parameters:
newCaseResults -


Copyright © 2004-2013. All Rights Reserved.