Package io.jenkins.plugins.coverage
Klasse CoverageProcessor
java.lang.Object
io.jenkins.plugins.coverage.CoverageProcessor
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Getter for property 'failNoReports'boolean
Getter for property 'failUnhealthy'boolean
Getter for property 'failUnstable'boolean
boolean
void
performCoverageReport
(List<CoverageReportAdapter> reportAdapters, List<ReportDetector> reportDetectors, List<Threshold> globalThresholds, Set<String> sourceDirectories, String sourceCodeEncoding, String scm) Convert all reports that are specified byCoverageReportAdapter
s and detected byReportDetector
s toCoverageResult
, and generate health report from CoverageResult.static CoverageResult
recoverCoverageResult
(Run<?, ?> run) RecoverCoverageResult
from build directory.static void
saveCoverageResult
(Run<?, ?> run, CoverageResult report) SaveCoverageResult
in build directory.void
setApplyThresholdRecursively
(boolean applyThresholdRecursively) void
setFailBuildIfCoverageDecreasedInChangeRequest
(boolean failBuildIfCoverageDecreasedInChangeRequest) void
setFailNoReports
(boolean failNoReports) Setter for property 'failNoReports'void
setFailUnhealthy
(boolean failUnhealthy) Setter for property 'failUnhealthy'void
setFailUnstable
(boolean failUnstable) Setter for property 'failUnstable'void
setGlobalTag
(String globalTag) void
setSourceFileResolver
(SourceFileResolver sourceFileResolver)
-
Konstruktordetails
-
CoverageProcessor
public CoverageProcessor(@NonNull Run<?, ?> run, @NonNull FilePath workspace, @NonNull TaskListener listener) - Parameter:
run
- a build this is running as a part ofworkspace
- a workspace to use for any file operationslistener
- a place to send output
-
-
Methodendetails
-
performCoverageReport
public void performCoverageReport(List<CoverageReportAdapter> reportAdapters, List<ReportDetector> reportDetectors, List<Threshold> globalThresholds, Set<String> sourceDirectories, String sourceCodeEncoding, String scm) throws IOException, InterruptedException, CoverageException Convert all reports that are specified byCoverageReportAdapter
s and detected byReportDetector
s toCoverageResult
, and generate health report from CoverageResult. Add them toCoverageAction
and add Action toRun
.- Parameter:
reportAdapters
- reportAdapters specified by userreportDetectors
- reportDetectors specified by userglobalThresholds
- global threshold specified by userscm
- the SCM which is used for calculating the code delta to a reference build- Löst aus:
IOException
InterruptedException
CoverageException
-
getFailUnhealthy
public boolean getFailUnhealthy()Getter for property 'failUnhealthy'- Gibt zurück:
- value for property 'failUnhealthy'
-
setFailUnhealthy
public void setFailUnhealthy(boolean failUnhealthy) Setter for property 'failUnhealthy'- Parameter:
failUnhealthy
- value to set for property 'failUnhealthy'
-
getFailUnstable
public boolean getFailUnstable()Getter for property 'failUnstable'- Gibt zurück:
- value for property 'failUnstable'
-
setFailUnstable
public void setFailUnstable(boolean failUnstable) Setter for property 'failUnstable'- Parameter:
failUnstable
- valzue to set for property 'failUnstable'
-
getFailNoReports
public boolean getFailNoReports()Getter for property 'failNoReports'- Gibt zurück:
- value for property 'failNoReports'
-
setFailNoReports
public void setFailNoReports(boolean failNoReports) Setter for property 'failNoReports'- Parameter:
failNoReports
- value to set for property 'failNoReports'
-
setSourceFileResolver
-
getGlobalTag
-
setGlobalTag
-
isApplyThresholdRecursively
public boolean isApplyThresholdRecursively() -
setApplyThresholdRecursively
public void setApplyThresholdRecursively(boolean applyThresholdRecursively) -
isFailBuildIfCoverageDecreasedInChangeRequest
public boolean isFailBuildIfCoverageDecreasedInChangeRequest() -
setFailBuildIfCoverageDecreasedInChangeRequest
public void setFailBuildIfCoverageDecreasedInChangeRequest(boolean failBuildIfCoverageDecreasedInChangeRequest) -
saveCoverageResult
SaveCoverageResult
in build directory.- Parameter:
run
- buildreport
- report- Löst aus:
IOException
-
recoverCoverageResult
public static CoverageResult recoverCoverageResult(Run<?, ?> run) throws IOException, ClassNotFoundExceptionRecoverCoverageResult
from build directory.- Parameter:
run
- build- Gibt zurück:
- Coverage result
- Löst aus:
IOException
ClassNotFoundException
-