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:
  • Constructor Details

  • Method Details

    • 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-null FlowNode.id this suite was generated in.
      Since:
      1.22
    • getEnclosingBlocks

      @Exported(visibility=9) @NonNull public List<String> getEnclosingBlocks()
      The possibly-empty list of FlowNode.ids 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:
    • getStderr

      @Exported public String getStderr()
      The stderr of this test.
      Returns:
      the stderr of this test.
      Since:
      1.281
      See Also:
    • 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 the CaseResult whose CaseResult.getFullDisplayName() is the same as the given string.
      Parameters:
      caseResultFullDisplayName - The case FullDisplayName.
      Returns:
      the CaseResult with the provided name.
    • getClassNames

      public Set<String> getClassNames()
    • 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