Class TrendGraph
java.lang.Object
com.piketec.jenkins.plugins.tpt.publisher.TrendGraph
- All Implemented Interfaces:
Action
,ModelObject
,org.kohsuke.stapler.StaplerProxy
Generates the trend graph on the main page.
- Author:
- FInfantino, Synopsys Inc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Data container to collect numbers of test results of TPT test execuiton for build previous builds. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doDynamic
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) This method is called everytime the page is refreshed.int
getError()
int
int
int
Job<?,
?> void
setError
(int error) Set the number of tests with execution error of the last build of the jenkins project this trend graph belongs to.void
setFailed
(int failed) Set the number of failed tests of the last build of the jenkins project this trend graph belongs to.void
setFailedBuilds
(ArrayList<Integer> failedBuilds) Set the number of failed builds of the jenkins project this trend graph belongs tovoid
setInconclusive
(int inconclusive) Set the number of inconclusive tests of the last build of the jenkins project this trend graph belongs to.void
setPassed
(int passed) Set the number of passed tests of the last build of the jenkins project this trend graph belongs to.
-
Constructor Details
-
TrendGraph
Creates a new TrendGraph- Parameters:
project
- The Jenkins project this Trendgraph belongs to.
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
- Specified by:
getUrlName
in interfaceAction
-
getProject
- Returns:
- The Jenkins project this Trendgraph belongs to
-
getFailedBuilds
- Returns:
- The number of failed builds of the jenkins project this trend graph belongs to
-
setFailedBuilds
Set the number of failed builds of the jenkins project this trend graph belongs to- Parameters:
failedBuilds
- The number of failed builds of the jenkins project this trend graph belongs to
-
getPassed
public int getPassed()- Returns:
- The number of passed tests of the last build of the jenkins project this trend graph belongs to.
-
setPassed
public void setPassed(int passed) Set the number of passed tests of the last build of the jenkins project this trend graph belongs to.- Parameters:
passed
- TThe number of passed tests of the last build of the jenkins project this trend graph belongs to.
-
getFailed
public int getFailed()- Returns:
- The number of failed tests of the last build of the jenkins project this trend graph belongs to.
-
setFailed
public void setFailed(int failed) Set the number of failed tests of the last build of the jenkins project this trend graph belongs to.- Parameters:
failed
- The number of failed tests of the last build of the jenkins project this trend graph belongs to.
-
getError
public int getError()- Returns:
- The number of tests with execution error of the last build of the jenkins project this trend graph belongs to.
-
setError
public void setError(int error) Set the number of tests with execution error of the last build of the jenkins project this trend graph belongs to.- Parameters:
error
- The number of tests with execution error of the last build of the jenkins project this trend graph belongs to.
-
getInconclusive
public int getInconclusive()- Returns:
- The number of inconclusive tests of the last build of the jenkins project this trend graph belongs to.
-
setInconclusive
public void setInconclusive(int inconclusive) Set the number of inconclusive tests of the last build of the jenkins project this trend graph belongs to.- Parameters:
inconclusive
- Set the number of inconclusive tests of the last build of the jenkins project this trend graph belongs to.
-
getHistoryData
- Returns:
- A List of Data containing the numer off passed, failed, inconcluive etc. TPT tests of previous builds.
-
getTarget
- Specified by:
getTarget
in interfaceorg.kohsuke.stapler.StaplerProxy
-
doDynamic
public void doDynamic(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, InterruptedException This method is called everytime the page is refreshed. It regenerates the json file and refreshes the graph.- Parameters:
req
- The requestrsp
- The response- Throws:
IOException
- if the response could not be generatedjavax.servlet.ServletException
- if the response could not be generatedInterruptedException
- if the job is cancelled
-