Class FlakyPackageResult

java.lang.Object
hudson.model.AbstractModelObject
hudson.tasks.junit.TestObject
hudson.tasks.test.TestObject
hudson.tasks.test.TestResult
hudson.tasks.test.TabulatedResult
hudson.tasks.test.MetaTabulatedResult
com.google.jenkins.flakyTestHandler.junit.FlakyPackageResult
All Implemented Interfaces:
ModelObject, SearchableModelObject, SearchItem, Serializable, Comparable<FlakyPackageResult>

public final class FlakyPackageResult extends hudson.tasks.test.MetaTabulatedResult implements Comparable<FlakyPackageResult>
Cumulative test result for a package augmented with flaky information. Majority of code copied from hudson.tasks.junit.PackageResult https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/junit/ PackageResult.java
Author:
Qingzhou Luo
See Also:
  • Method Details

    • getOwner

      public AbstractBuild<?,?> getOwner()
      Overrides:
      getOwner in class hudson.tasks.junit.TestObject
    • getParent

      public FlakyTestResult getParent()
      Specified by:
      getParent in class hudson.tasks.test.TestObject
    • getName

      @Exported(visibility=999) public String getName()
      Overrides:
      getName in class hudson.tasks.test.TestObject
    • getSafeName

      public String getSafeName()
      Overrides:
      getSafeName in class hudson.tasks.test.TestObject
    • findCorrespondingResult

      public hudson.tasks.test.TestResult findCorrespondingResult(String id)
      Specified by:
      findCorrespondingResult in class hudson.tasks.test.TestObject
    • getTitle

      @SuppressRestrictedWarnings(hudson.tasks.junit.Messages.class) public String getTitle()
      Overrides:
      getTitle in class hudson.tasks.test.TestResult
    • getChildTitle

      @SuppressRestrictedWarnings(hudson.tasks.junit.Messages.class) public String getChildTitle()
      Overrides:
      getChildTitle in class hudson.tasks.test.TabulatedResult
    • getDuration

      public float getDuration()
      Overrides:
      getDuration in class hudson.tasks.test.TestResult
    • getPassCount

      @Exported public int getPassCount()
      Overrides:
      getPassCount in class hudson.tasks.test.TestResult
    • getFailCount

      @Exported public int getFailCount()
      Overrides:
      getFailCount in class hudson.tasks.test.TestResult
    • getSkipCount

      @Exported public int getSkipCount()
      Overrides:
      getSkipCount in class hudson.tasks.test.TestResult
    • getFlakeCount

      @Exported public int getFlakeCount()
    • getTotalCount

      public int getTotalCount()
      Overrides:
      getTotalCount in class hudson.tasks.test.TestObject
    • getDynamic

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

      public FlakyClassResult getClassResult(String name)
    • getChildren

      @Exported(name="child") public Collection<FlakyClassResult> getChildren()
      Specified by:
      getChildren in class hudson.tasks.test.TabulatedResult
    • hasChildren

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

      public List<FlakyCaseResult> getFailedTests()
      Returns a list of the failed cases, in no particular sort order
      Specified by:
      getFailedTests in class hudson.tasks.test.MetaTabulatedResult
    • getPassedTests

      public Collection<? extends hudson.tasks.test.TestResult> getPassedTests()
      Gets the "children" of this test result that passed without a flake
      Overrides:
      getPassedTests in class hudson.tasks.test.TestResult
      Returns:
      the children of this test result, if any, or an empty collection
    • getSkippedTests

      public Collection<? extends hudson.tasks.test.TestResult> getSkippedTests()
      Gets the "children" of this test result that were skipped
      Overrides:
      getSkippedTests in class hudson.tasks.test.TestResult
      Returns:
      the children of this test result, if any, or an empty list
    • getFlakyTests

      public List<FlakyCaseResult> getFlakyTests()
      Gets the "children" of this test result that were flaky
      Returns:
      the children of this test result, if any, or an empty list
    • isPassed

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

      public void tally()
      Recount my children
      Overrides:
      tally in class hudson.tasks.test.TestResult
    • compareTo

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

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

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

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