Package hudson.plugins.robot.model
Class RobotSuiteResult
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.plugins.robot.model.RobotTestObject
-
- hudson.plugins.robot.model.RobotSuiteResult
-
- All Implemented Interfaces:
ModelObject
,SearchableModelObject
,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
Constructors Constructor Description RobotSuiteResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 keptvoid
addChild(RobotSuiteResult child)
Adds a nested suite to this suite.void
addChildren(Collection<RobotSuiteResult> childSuites)
If suites with same name exist, the originals are keptvoid
failTeardown()
Fail all cases because of teardown failure.RobotTestObject
findObjectById(String id)
Get object by path in treeList<RobotCaseResult>
getAllCases()
Get all cases in this suite and its child suitesList<RobotSuiteResult>
getAllChildSuites()
Get all children of this suiteList<RobotCaseResult>
getAllFailedCases()
Get all failed cases in this suite and its child suitesList<RobotCaseResult>
getAllPassedCases()
Get all passed cases in this suite and its child suitesList<RobotCaseResult>
getAllSkippedCases()
Get all skipped cases in this suite and its child suitesRobotCaseResult
getCase(String name)
Get case result by duplicate safe unencoded nameCollection<RobotCaseResult>
getCaseResults()
Get all case results belonging to this suiteCollection<RobotSuiteResult>
getChildSuites()
Get the immediate child suites of this suitelong
getCriticalFailed()
Get number of failed critical testslong
getCriticalPassed()
Get number of passed critical testsint
getCriticalTotal()
Get number of all critical testsString
getDescription()
Get the description of this suiteString
getDisplayName()
long
getDuration()
Get duration of this testobject runObject
getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerRequest rsp)
Get suite or case result by url encoded nameint
getFailed()
Get number of all failed testsString
getName()
Get the name of this suiteRobotTestObject
getParent()
Get the parent object of this suite in treeint
getPassed()
Get number of all passed testsRobotSuiteResult
getPreviousResult()
String
getSearchUrl()
int
getSkipped()
RobotSuiteResult
getSuite(String name)
Get nested suite result by duplicate safe unencoded nameint
getTotal()
Get number of all testsvoid
setDescription(String description)
void
setElapsedTime(String elapsedTime)
void
setEndTime(String endTime)
void
setName(String name)
void
setParent(RobotTestObject parent)
void
setSchemaVersion(int version)
void
setStartTime(String startTime)
void
tally(RobotBuildAction parentAction)
Count total values from children and set same parentaction to all-
Methods inherited from class hudson.plugins.robot.model.RobotTestObject
doDurationGraph, doGraph, getDuplicateSafeName, getDurationDiff, getHasLog, getHasReport, getHumanReadableDuration, getId, getLogFile, getOldFormatName, getOwner, getParentAction, getRelativeId, getRelativePackageName, getRelativeParent, getReportFile, getResultInBuild, isNeedToGenerate, setDuplicateSafeName, setId, setLogFile, setParentAction, setReportFile, urlEncode
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
-
-
-
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
- Child to be added
-
getChildSuites
public Collection<RobotSuiteResult> getChildSuites()
Get the immediate child suites of this suite- Returns:
- the immediate child suites of this suite
-
getParent
public RobotTestObject getParent()
Get the parent object of this suite in tree- Specified by:
getParent
in classRobotTestObject
- Returns:
- the parent object of this suite in tree
-
setParent
public void setParent(RobotTestObject parent)
-
getName
public String getName()
Get the name of this suite- Specified by:
getName
in classRobotTestObject
- Returns:
- Suite name
-
setName
public void setName(String name)
-
getDescription
public String getDescription()
Get the description of this suite- Specified by:
getDescription
in classRobotTestObject
- Returns:
- Suite description
-
setDescription
public void setDescription(String description)
-
getCaseResults
public Collection<RobotCaseResult> getCaseResults()
Get all case results belonging to this suite- Returns:
- Collection of all case results belonging to this suite
-
getFailed
public int getFailed()
Get number of all failed tests- Specified by:
getFailed
in classRobotTestObject
- Returns:
- number of all failed tests
-
getPassed
public int getPassed()
Get number of all passed tests- Specified by:
getPassed
in classRobotTestObject
- Returns:
- number of all passed tests
-
getSkipped
public int getSkipped()
- Specified by:
getSkipped
in classRobotTestObject
-
getTotal
public int getTotal()
Get number of all tests- Returns:
- number of all tests
-
getCriticalPassed
public long getCriticalPassed()
Get number of passed critical tests- Specified by:
getCriticalPassed
in classRobotTestObject
- Returns:
- number of passed critical tests
-
getCriticalFailed
public long getCriticalFailed()
Get number of failed critical tests- Specified by:
getCriticalFailed
in classRobotTestObject
- Returns:
- number of failed critical tests
-
getCriticalTotal
public int getCriticalTotal()
Get number of all critical tests- Returns:
- number of all critical tests
-
setSchemaVersion
public void setSchemaVersion(int version)
-
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
- Case to be added
-
setElapsedTime
public void setElapsedTime(String elapsedTime)
-
setStartTime
public void setStartTime(String startTime)
-
setEndTime
public void setEndTime(String endTime)
-
getDuration
public long getDuration()
Description copied from class:RobotTestObject
Get duration of this testobject run- Overrides:
getDuration
in classRobotTestObject
- Returns:
- Duration of this testobject run
-
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
- suite name- Returns:
- suite result, null if none found
-
getCase
public RobotCaseResult getCase(String name)
Get case result by duplicate safe unencoded name- Parameters:
name
- case name- Returns:
- case result, null if none found
-
getPreviousResult
public RobotSuiteResult getPreviousResult()
- Specified by:
getPreviousResult
in classRobotTestObject
-
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
- tokenreq
- StaplerRequestrsp
- StaplerResponse- Returns:
- suite or case result by url encoded name
-
getAllChildSuites
public List<RobotSuiteResult> getAllChildSuites()
Get all children of this suite- Returns:
- all children of this suite
-
getAllFailedCases
public List<RobotCaseResult> getAllFailedCases()
Get all failed cases in this suite and its child suites- Returns:
- all failed cases in this suite and its child suites
-
getAllPassedCases
public List<RobotCaseResult> getAllPassedCases()
Get all passed cases in this suite and its child suites- Returns:
- all passed cases in this suite and its child suites
-
getAllSkippedCases
public List<RobotCaseResult> getAllSkippedCases()
Get all skipped cases in this suite and its child suites- Returns:
- all skipped cases in this suite and its child suites
-
getAllCases
public List<RobotCaseResult> getAllCases()
Get all cases in this suite and its child suites- Returns:
- all cases in this suite and its child suites
-
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
- Common parent action
-
findObjectById
public RobotTestObject findObjectById(String id)
Get object by path in tree- Parameters:
id
- path to object- Returns:
- Found Object
-
addChildren
public void addChildren(Collection<RobotSuiteResult> childSuites)
If suites with same name exist, the originals are kept- Parameters:
childSuites
- Child suites to be added
-
addCaseResults
public void addCaseResults(Collection<RobotCaseResult> newCaseResults)
If cases with same name exist, the originals are kept- Parameters:
newCaseResults
- New case results to be added
-
-