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.HealthReportgetBuildHealth()Get the coverageHealthReport.intgetBuildNumber()StringgetDisplayName()StringgetIconFileName()VectorCASTBuildActiongetPreviousResult()Gets the corresponding coverage report object in the previous run that has the record.Collection<? extends Action>getProjectActions()CoverageReportgetResult()Obtains the detailedCoverageReportinstance.ObjectgetTarget()StringgetUrlName()protected static FilePath[]getVectorCASTCoverageReports(File file)static VectorCASTBuildActionload(AbstractBuild<?,?> owner, Rule rule, VectorCASTHealthReportThresholds thresholds, FilePath... files)Constructs the object from VectorCAST XML report files.static VectorCASTBuildActionload(AbstractBuild<?,?> owner, Rule rule, VectorCASTHealthReportThresholds thresholds, InputStream... streams)static VectorCASTBuildActionload(Run<?,?> owner, Rule rule, VectorCASTHealthReportThresholds thresholds, InputStream... streams)voidonAttached(Run<?,?> run)voidonLoad(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:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileNamein interfaceAction
-
getUrlName
public String getUrlName()
- Specified by:
getUrlNamein interfaceAction
-
getBuildHealth
public HealthReport getBuildHealth()
Get the coverageHealthReport.- Specified by:
getBuildHealthin interfaceHealthReportingAction- Returns:
- The health report or
nullif health reporting is disabled. - Since:
- 1.7
-
getTarget
public Object getTarget()
- Specified by:
getTargetin interfaceorg.kohsuke.stapler.StaplerProxy
-
getBuild
public Run<?,?> getBuild()
Description copied from class:CoverageObjectGets the build object that owns the whole coverage report tree.- Specified by:
getBuildin classCoverageObject<VectorCASTBuildAction>- Returns:
- the run instance
-
getBuildNumber
public int getBuildNumber()
-
getVectorCASTCoverageReports
protected static FilePath[] getVectorCASTCoverageReports(File file) throws IOException, InterruptedException
- Throws:
IOExceptionInterruptedException
-
getResult
public CoverageReport getResult()
Obtains the detailedCoverageReportinstance.- Returns:
- coverage report
-
getPreviousResult
public VectorCASTBuildAction getPreviousResult()
Description copied from class:CoverageObjectGets the corresponding coverage report object in the previous run that has the record.- Specified by:
getPreviousResultin 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:
IOExceptionorg.xmlpull.v1.XmlPullParserException
-
onLoad
public void onLoad(Run<?,?> run)
- Specified by:
onLoadin interfaceRunAction2
-
onAttached
public void onAttached(Run<?,?> run)
- Specified by:
onAttachedin interfaceRunAction2
-
getProjectActions
public Collection<? extends Action> getProjectActions()
- Specified by:
getProjectActionsin interfaceSimpleBuildStep.LastBuildAction
-
-