Package hudson.tasks.junit
Class SuiteResult
- java.lang.Object
-
- hudson.tasks.junit.SuiteResult
-
- All Implemented Interfaces:
Serializable
@ExportedBean public final class SuiteResult extends Object implements Serializable
Result of one test suite.The notion of "test suite" is rather arbitrary in JUnit ant task. It's basically one invocation of junit.
This object is really only used as a part of the persisted object tree.
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SuiteResult.SuiteResultParserConfigurationContext
Deprecated.with no replacement.
-
Constructor Summary
Constructors Constructor Description SuiteResult(String name, String stdout, String stderr, PipelineTestDetails pipelineTestDetails)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCase(CaseResult cr)
CaseResult
getCase(String caseResultFullDisplayName)
Returns theCaseResult
whoseCaseResult.getFullDisplayName()
is the same as the given string.List<CaseResult>
getCases()
Set<String>
getClassNames()
float
getDuration()
List<String>
getEnclosingBlockNames()
The possibly-empty list of display names of enclosing blocks within which this suite was generated.List<String>
getEnclosingBlocks()
The possibly-empty list ofFlowNode.id
s for enclosing blocks within which this suite was generated.String
getFile()
The absolute path to the original test report.String
getId()
String
getName()
String
getNodeId()
The possibly-nullFlowNode.id
this suite was generated in.TestResult
getParent()
SuiteResult
getPreviousResult()
Map<String,String>
getProperties()
The properties of this test.long
getStartTime()
String
getStderr()
The stderr of this test.String
getStdout()
The stdout of this test.String
getTimestamp()
void
merge(SuiteResult sr)
Merges another SuiteResult into this one.long
parseTime(String time)
Parses time as epoch milli from time stringvoid
setParent(TestResult parent)
KLUGE.void
setStartTime(long start)
-
-
-
Constructor Detail
-
SuiteResult
public SuiteResult(String name, String stdout, String stderr, @CheckForNull PipelineTestDetails pipelineTestDetails)
- Since:
- 1.22
-
-
Method Detail
-
addCase
public void addCase(CaseResult cr)
-
getName
@Exported(visibility=9) public String getName()
-
getDuration
@Exported(visibility=9) public float getDuration()
-
getNodeId
@Exported(visibility=9) @CheckForNull public String getNodeId()
The possibly-nullFlowNode.id
this suite was generated in.- Since:
- 1.22
-
getEnclosingBlocks
@Exported(visibility=9) @NonNull public List<String> getEnclosingBlocks()
The possibly-empty list ofFlowNode.id
s for enclosing blocks within which this suite was generated.- Since:
- 1.22
-
getEnclosingBlockNames
@Exported(visibility=9) @NonNull public List<String> getEnclosingBlockNames()
The possibly-empty list of display names of enclosing blocks within which this suite was generated.- Since:
- 1.22
-
getStdout
@Exported public String getStdout()
The stdout of this test.- Returns:
- the stdout of this test.
- Since:
- 1.281
- See Also:
CaseResult.getStdout()
-
getStderr
@Exported public String getStderr()
The stderr of this test.- Returns:
- the stderr of this test.
- Since:
- 1.281
- See Also:
CaseResult.getStderr()
-
getProperties
@Exported public Map<String,String> getProperties()
The properties of this test.- Returns:
- the properties of this test.
-
getFile
public String getFile()
The absolute path to the original test report. OS-dependent.- Returns:
- the absolute path to the original test report.
-
getParent
public TestResult getParent()
-
getTimestamp
@Exported(visibility=9) public String getTimestamp()
-
getStartTime
public long getStartTime()
-
setStartTime
public void setStartTime(long start)
-
getId
@Exported(visibility=9) public String getId()
-
getCases
@Exported(inline=true, visibility=9) public List<CaseResult> getCases()
-
getPreviousResult
public SuiteResult getPreviousResult()
-
getCase
public CaseResult getCase(String caseResultFullDisplayName)
Returns theCaseResult
whoseCaseResult.getFullDisplayName()
is the same as the given string.- Parameters:
caseResultFullDisplayName
- The case FullDisplayName.- Returns:
- the
CaseResult
with the provided name.
-
setParent
public void setParent(TestResult parent)
KLUGE. We have to call this to prevent freeze() from calling c.freeze() on all its children, because that in turn calls c.getOwner(), which requires a non-null parent.- Parameters:
parent
-
-
parseTime
public long parseTime(String time)
Parses time as epoch milli from time string- Parameters:
time
-- Returns:
- time in epoch milli
-
merge
public void merge(SuiteResult sr)
Merges another SuiteResult into this one.- Parameters:
sr
- the SuiteResult to merge into this one
-
-