Class TPTReportPage

java.lang.Object
com.piketec.jenkins.plugins.tpt.publisher.TPTReportPage
All Implemented Interfaces:
Action, ModelObject, RunAction2, SimpleBuildStep.LastBuildAction

public class TPTReportPage extends Object implements RunAction2, SimpleBuildStep.LastBuildAction
A Page with a table of all executed TPT files and their configuration on top and a table with all failed test cases.
Author:
FInfantino, Synopsys Inc.
  • Constructor Details

    • TPTReportPage

      public TPTReportPage(Run<?,?> build, TPTTestCase[] failedTests, TPTFile[] tptFiles)
      Creates a new TPTRportPage
      Parameters:
      build - The Jnekins build
      failedTests - The list of failed test cases
      tptFiles - The List of TPT files
  • Method Details

    • readResolve

      protected Object readResolve()
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

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

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getBuild

      public Run<?,?> getBuild()
      Returns:
      The Jenkins build
    • setBuild

      public void setBuild(AbstractBuild<?,?> build)
      Set the Jenkins build
      Parameters:
      build - The Jenkins build
    • onAttached

      public void onAttached(Run<?,?> run)
      Specified by:
      onAttached in interface RunAction2
    • onLoad

      public void onLoad(Run<?,?> run)
      Specified by:
      onLoad in interface RunAction2
    • getRun

      public Run getRun()
      Returns:
      The Jenkins run
    • getTptFiles

      @StaplerDispatchable public TPTFile[] getTptFiles()
      Returns:
      The list of executed TPT files
    • setTptFiles

      public void setTptFiles(TPTFile[] tptFiles)
      Set the list of executed TPT files
      Parameters:
      tptFiles - The list of executed TPT files
    • getFailedTests

      @StaplerDispatchable public TPTTestCase[] getFailedTests()
      Returns:
      The list of failed test cases
    • setFailedTests

      public void setFailedTests(TPTTestCase[] failedTests)
      Set the list of failed test cases
      Parameters:
      failedTests - The list of failed test cases
    • getPassedCount

      public int getPassedCount()
      Returns:
      The number of passed test cases
    • setPassedCount

      public void setPassedCount(int passedCount)
      Set the number of passed test cases
      Parameters:
      passedCount - The number of passed test cases
    • getInconclusiveCount

      public int getInconclusiveCount()
      Returns:
      The number of inconclusive test cases
    • setInconclusiveCount

      public void setInconclusiveCount(int inconclusiveCount)
      Set the number of inconclusive test cases
      Parameters:
      inconclusiveCount - The number of inconclusive test cases
    • getErrorCount

      public int getErrorCount()
      Returns:
      The number of test cases with execution error
    • setErrorCount

      public void setErrorCount(int errorCount)
      Set the number of test cases with execution error
      Parameters:
      errorCount - The number of test cases with execution error
    • getFailedCount

      public int getFailedCount()
      Returns:
      he number of failed test cases
    • setFailedCount

      public void setFailedCount(int failedCount)
      Set the number of failed test cases
      Parameters:
      failedCount - The number of failed test cases
    • getNumberFromHistory

      public int getNumberFromHistory(int failedSince)
      Used to calculate the actual build number of the 'failed since' build, failed since is always >=1
      Parameters:
      failedSince - The count of builds in the past that should have been unstable.
      Returns:
      the actual number from the 'failed since' build
    • getPieChart

      @JavaScriptMethod public String getPieChart()
    • getProjectActions

      public Collection<? extends Action> getProjectActions()
      Specified by:
      getProjectActions in interface SimpleBuildStep.LastBuildAction