Package io.jenkins.plugins.coverage
Klasse CoverageProcessor
java.lang.Object
io.jenkins.plugins.coverage.CoverageProcessor
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanGetter for property 'failNoReports'booleanGetter for property 'failUnhealthy'booleanGetter for property 'failUnstable'booleanbooleanvoidperformCoverageReport(List<CoverageReportAdapter> reportAdapters, List<ReportDetector> reportDetectors, List<Threshold> globalThresholds, Set<String> sourceDirectories, String sourceCodeEncoding, String scm) Convert all reports that are specified byCoverageReportAdapters and detected byReportDetectors toCoverageResult, and generate health report from CoverageResult.static CoverageResultrecoverCoverageResult(Run<?, ?> run) RecoverCoverageResultfrom build directory.static voidsaveCoverageResult(Run<?, ?> run, CoverageResult report) SaveCoverageResultin build directory.voidsetApplyThresholdRecursively(boolean applyThresholdRecursively) voidsetFailBuildIfCoverageDecreasedInChangeRequest(boolean failBuildIfCoverageDecreasedInChangeRequest) voidsetFailNoReports(boolean failNoReports) Setter for property 'failNoReports'voidsetFailUnhealthy(boolean failUnhealthy) Setter for property 'failUnhealthy'voidsetFailUnstable(boolean failUnstable) Setter for property 'failUnstable'voidsetGlobalTag(String globalTag) voidsetSourceFileResolver(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 byCoverageReportAdapters and detected byReportDetectors toCoverageResult, and generate health report from CoverageResult. Add them toCoverageActionand 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:
IOExceptionInterruptedExceptionCoverageException
-
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
SaveCoverageResultin build directory.- Parameter:
run- buildreport- report- Löst aus:
IOException
-
recoverCoverageResult
public static CoverageResult recoverCoverageResult(Run<?, ?> run) throws IOException, ClassNotFoundExceptionRecoverCoverageResultfrom build directory.- Parameter:
run- build- Gibt zurück:
- Coverage result
- Löst aus:
IOExceptionClassNotFoundException
-