Class TPTReportPage
- java.lang.Object
-
- com.piketec.jenkins.plugins.tpt.publisher.TPTReportPage
-
- All Implemented Interfaces:
Action
,ModelObject
,RunAction2
,SimpleBuildStep.LastBuildAction
,org.kohsuke.stapler.StaplerProxy
public class TPTReportPage extends java.lang.Object implements RunAction2, SimpleBuildStep.LastBuildAction, org.kohsuke.stapler.StaplerProxy
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, PikeTec GmbH
-
-
Constructor Summary
Constructors Constructor Description TPTReportPage(Run<?,?> build, java.util.ArrayList<TPTTestCase> failedTests, java.util.ArrayList<TPTFile> tptFiles)
Creates a new TPTRportPage
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Run<?,?>
getBuild()
java.lang.String
getDisplayName()
java.lang.Object
getDynamic(java.lang.String name, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Host images, HTML report and failed reportint
getErrorCount()
int
getFailedCount()
java.util.List<TPTTestCase>
getFailedTests()
java.lang.String
getIconFileName()
int
getInconclusiveCount()
int
getNumberFromHistory(int failedSince)
Used to calculate the actual build number of the 'failed since' build, failed since is always >=1int
getPassedCount()
java.lang.String
getPieChart()
java.util.Collection<? extends Action>
getProjectActions()
Run
getRun()
java.lang.Object
getTarget()
java.util.List<TPTFile>
getTptFiles()
java.lang.String
getUrlName()
void
onAttached(Run<?,?> run)
void
onLoad(Run<?,?> run)
void
setBuild(AbstractBuild<?,?> build)
Set the Jenkins buildvoid
setErrorCount(int errorCount)
Set the number of test cases with execution errorvoid
setFailedCount(int failedCount)
Set the number of failed test casesvoid
setFailedTests(java.util.ArrayList<TPTTestCase> failedTests)
Set the list of failed test casesvoid
setInconclusiveCount(int inconclusiveCount)
Set the number of inconclusive test casesvoid
setPassedCount(int passedCount)
Set the number of passed test casesvoid
setTptFiles(java.util.List<TPTFile> tptFiles)
Set the list of executed TPT files
-
-
-
Constructor Detail
-
TPTReportPage
public TPTReportPage(Run<?,?> build, java.util.ArrayList<TPTTestCase> failedTests, java.util.ArrayList<TPTFile> tptFiles)
Creates a new TPTRportPage- Parameters:
build
- The Jnekins buildfailedTests
- The list of failed test casestptFiles
- The List of TPT files
-
-
Method Detail
-
getIconFileName
public java.lang.String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
public java.lang.String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
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 interfaceRunAction2
-
onLoad
public void onLoad(Run<?,?> run)
- Specified by:
onLoad
in interfaceRunAction2
-
getRun
public Run getRun()
- Returns:
- The Jenkins run
-
getTarget
public java.lang.Object getTarget()
- Specified by:
getTarget
in interfaceorg.kohsuke.stapler.StaplerProxy
-
getTptFiles
public java.util.List<TPTFile> getTptFiles()
- Returns:
- The list of executed TPT files
-
setTptFiles
public void setTptFiles(java.util.List<TPTFile> tptFiles)
Set the list of executed TPT files- Parameters:
tptFiles
- The list of executed TPT files
-
getFailedTests
public java.util.List<TPTTestCase> getFailedTests()
- Returns:
- The list of failed test cases
-
setFailedTests
public void setFailedTests(java.util.ArrayList<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 java.lang.String getPieChart()
-
getDynamic
public java.lang.Object getDynamic(java.lang.String name, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Host images, HTML report and failed report- Parameters:
name
- string on the requested urlreq
- The requestrsp
- The response- Returns:
- an new Action that is going to be host
- See Also:
- "http://stapler.kohsuke.org/reference.html"
-
getProjectActions
public java.util.Collection<? extends Action> getProjectActions()
- Specified by:
getProjectActions
in interfaceSimpleBuildStep.LastBuildAction
-
-