Class 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
    • 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-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:
        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.
      • 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()
      • 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