Class PackageResult

All Implemented Interfaces:
ModelObject, SearchableModelObject, SearchItem, Serializable, Comparable<PackageResult>

public final class PackageResult extends MetaTabulatedResult implements Comparable<PackageResult>
Cumulative test result for a package.
Author:
Kohsuke Kawaguchi
See Also:
  • Constructor Details

  • Method Details

    • getRun

      public Run<?,?> getRun()
      Overrides:
      getRun in class TestObject
      Returns:
      the run in which this test was executed.
    • getParent

      public TestResult getParent()
      Description copied from class: TestObject
      Reverse pointer of TabulatedResult.getChildren().
      Specified by:
      getParent in class TestObject
      Returns:
      the parent TestObject.
    • getName

      @Exported(visibility=999) public String getName()
      Description copied from class: TestObject
      Gets the name of this object.
      Overrides:
      getName in class TestObject
      Returns:
      the name of this object.
    • getSafeName

      public String getSafeName()
      Description copied from class: TestObject
      Gets the version of TestObject.getName() that's URL-safe.
      Overrides:
      getSafeName in class TestObject
      Returns:
      the URL-safe name of this object.
    • findCorrespondingResult

      public TestResult findCorrespondingResult(String id)
      Description copied from class: TestObject
      Find the test result corresponding to the one identified by id within this test result.
      Specified by:
      findCorrespondingResult in class TestObject
      Parameters:
      id - The path to the original test result
      Returns:
      A corresponding test result, or null if there is no corresponding result.
    • getTitle

      public String getTitle()
      Description copied from class: TestResult
      Gets the human readable title of this result object.
      Overrides:
      getTitle in class TestResult
      Returns:
      the human readable title of this result object.
    • getChildTitle

      public String getChildTitle()
      Overrides:
      getChildTitle in class TabulatedResult
    • getChildType

      public String getChildType()
      Description copied from class: TabulatedResult
      Get a simple name for the type of children the TabulatedResult.getChildren() method returns, for example "case", "class" or "package".
      Overrides:
      getChildType in class TabulatedResult
      Returns:
      the type of children this result has, all lowercase.
    • getDuration

      public float getDuration()
      Description copied from class: TestResult
      Time it took to run this test. In seconds.
      Overrides:
      getDuration in class TestResult
      Returns:
      the time in seconds the test ran.
    • getStartTime

      public long getStartTime()
    • getPassCount

      @Exported public int getPassCount()
      Description copied from class: TestResult
      Gets the total number of passed tests.
      Overrides:
      getPassCount in class TestResult
      Returns:
      the total number of passed tests.
    • getFailCount

      @Exported public int getFailCount()
      Description copied from class: TestResult
      Gets the total number of failed tests.
      Overrides:
      getFailCount in class TestResult
      Returns:
      the total number of failed tests.
    • getSkipCount

      @Exported public int getSkipCount()
      Description copied from class: TestResult
      Gets the total number of skipped tests.
      Overrides:
      getSkipCount in class TestResult
      Returns:
      the total number of skipped tests.
    • getDynamic

      public Object getDynamic(String name, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
      Overrides:
      getDynamic in class TestObject
    • getClassResult

      public ClassResult getClassResult(String name)
    • getChildren

      @Exported(name="child") public Collection<ClassResult> getChildren()
      Description copied from class: TabulatedResult
      Gets the child test result objects.
      Specified by:
      getChildren in class TabulatedResult
      Returns:
      the child test result objects.
      See Also:
    • hasChildren

      public boolean hasChildren()
      Whether this test result has children.
      Specified by:
      hasChildren in class TabulatedResult
    • getFailedTests

      public List<CaseResult> getFailedTests()
      Returns a list of the failed cases, in no particular sort order
      Specified by:
      getFailedTests in class MetaTabulatedResult
      Returns:
      the children of this test result, if any, or an empty collection
    • getFailedTestsSortedByAge

      public List<CaseResult> getFailedTestsSortedByAge()
      Returns a list of the failed cases, sorted by age.
      Returns:
      a list of the failed cases, sorted by age.
    • getPassedTests

      public List<CaseResult> getPassedTests()
      Gets the "children" of this test result that passed
      Overrides:
      getPassedTests in class TestResult
      Returns:
      the children of this test result, if any, or an empty collection
    • getSkippedTests

      public List<CaseResult> getSkippedTests()
      Gets the "children" of this test result that were skipped
      Overrides:
      getSkippedTests in class TestResult
      Returns:
      the children of this test result, if any, or an empty list
    • isPassed

      public boolean isPassed()
      Overrides:
      isPassed in class TestResult
      Returns:
      true if every test was not skipped and every test did not fail, false otherwise.
    • add

      public void add(CaseResult r)
    • tally

      public void tally()
      Recount my children
      Overrides:
      tally in class TestResult
    • compareTo

      public int compareTo(PackageResult that)
      Specified by:
      compareTo in interface Comparable<PackageResult>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface ModelObject
    • setStartTime

      public void setStartTime(long time)