Class VectorCASTBuildAction
- java.lang.Object
-
- com.vectorcast.plugins.vectorcastcoverage.CoverageObject<VectorCASTBuildAction>
-
- com.vectorcast.plugins.vectorcastcoverage.VectorCASTBuildAction
-
- All Implemented Interfaces:
Action
,HealthReportingAction
,ModelObject
,Serializable
,RunAction2
,SimpleBuildStep.LastBuildAction
,org.kohsuke.stapler.StaplerProxy
public final class VectorCASTBuildAction extends CoverageObject<VectorCASTBuildAction> implements HealthReportingAction, org.kohsuke.stapler.StaplerProxy, Serializable, RunAction2, SimpleBuildStep.LastBuildAction
Build view extension by VectorCAST plugin. AsCoverageObject
, it retains the overall coverage report.- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VectorCASTBuildAction(Run<?,?> owner, Rule rule, Ratio StatementCoverage, Ratio BranchCoverage, Ratio BasisPathCoverage, Ratio MCDCCoverage, Ratio FunctionCoverage, Ratio FunctionCallCoverage, Ratio Complexity, VectorCASTHealthReportThresholds thresholds)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Run<?,?>
getBuild()
Gets the build object that owns the whole coverage report tree.HealthReport
getBuildHealth()
Get the coverageHealthReport
.int
getBuildNumber()
String
getDisplayName()
String
getIconFileName()
VectorCASTBuildAction
getPreviousResult()
Gets the corresponding coverage report object in the previous run that has the record.Collection<? extends Action>
getProjectActions()
CoverageReport
getResult()
Obtains the detailedCoverageReport
instance.Object
getTarget()
String
getUrlName()
protected static FilePath[]
getVectorCASTCoverageReports(File file)
static VectorCASTBuildAction
load(AbstractBuild<?,?> owner, Rule rule, VectorCASTHealthReportThresholds thresholds, FilePath... files)
Constructs the object from VectorCAST XML report files.static VectorCASTBuildAction
load(AbstractBuild<?,?> owner, Rule rule, VectorCASTHealthReportThresholds thresholds, InputStream... streams)
static VectorCASTBuildAction
load(Run<?,?> owner, Rule rule, VectorCASTHealthReportThresholds thresholds, InputStream... streams)
void
onAttached(Run<?,?> run)
void
onLoad(Run<?,?> run)
-
Methods inherited from class com.vectorcast.plugins.vectorcastcoverage.CoverageObject
doGraph, getApi, getBasisPathCoverage, getBranchCoverage, getComplexity, getFunctionCallCoverage, getFunctionCoverage, getMaxHistory, getMaxHistoryFreestyleJob, getMaxHistoryPipelineJob, getMCDCCoverage, getStatementCoverage, hasBasisPathCoverage, hasBranchCoverage, hasComplexity, hasCoverage, hasFunctionCallCoverage, hasFunctionCoverage, hasMCDCCoverage, hasStatementCoverage, isFailed, printFourCoverageColumns, printRatioCell, printRatioTable, setFailed
-
-
-
-
Field Detail
-
owner
public transient Run<?,?> owner
-
-
Method Detail
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
-
getUrlName
public String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
getBuildHealth
public HealthReport getBuildHealth()
Get the coverageHealthReport
.- Specified by:
getBuildHealth
in interfaceHealthReportingAction
- Returns:
- The health report or
null
if health reporting is disabled. - Since:
- 1.7
-
getTarget
public Object getTarget()
- Specified by:
getTarget
in interfaceorg.kohsuke.stapler.StaplerProxy
-
getBuild
public Run<?,?> getBuild()
Description copied from class:CoverageObject
Gets the build object that owns the whole coverage report tree.- Specified by:
getBuild
in classCoverageObject<VectorCASTBuildAction>
- Returns:
- the run instance
-
getBuildNumber
public int getBuildNumber()
-
getVectorCASTCoverageReports
protected static FilePath[] getVectorCASTCoverageReports(File file) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
getResult
public CoverageReport getResult()
Obtains the detailedCoverageReport
instance.- Returns:
- coverage report
-
getPreviousResult
public VectorCASTBuildAction getPreviousResult()
Description copied from class:CoverageObject
Gets the corresponding coverage report object in the previous run that has the record.- Specified by:
getPreviousResult
in classCoverageObject<VectorCASTBuildAction>
- Returns:
- null if no earlier record was found.
-
load
public static VectorCASTBuildAction load(AbstractBuild<?,?> owner, Rule rule, VectorCASTHealthReportThresholds thresholds, FilePath... files) throws IOException
Constructs the object from VectorCAST XML report files.- Parameters:
owner
- ownerrule
- rulethresholds
- thresholdsfiles
- files- Returns:
- build action
- Throws:
IOException
- if failed to parse the file.
-
load
public static VectorCASTBuildAction load(Run<?,?> owner, Rule rule, VectorCASTHealthReportThresholds thresholds, InputStream... streams) throws IOException
- Throws:
IOException
-
load
public static VectorCASTBuildAction load(AbstractBuild<?,?> owner, Rule rule, VectorCASTHealthReportThresholds thresholds, InputStream... streams) throws IOException, org.xmlpull.v1.XmlPullParserException
- Throws:
IOException
org.xmlpull.v1.XmlPullParserException
-
onLoad
public void onLoad(Run<?,?> run)
- Specified by:
onLoad
in interfaceRunAction2
-
onAttached
public void onAttached(Run<?,?> run)
- Specified by:
onAttached
in interfaceRunAction2
-
getProjectActions
public Collection<? extends Action> getProjectActions()
- Specified by:
getProjectActions
in interfaceSimpleBuildStep.LastBuildAction
-
-