Package com.compuware.jenkins.build
Class CodeCoverageScanner
- java.lang.Object
-
- com.compuware.jenkins.build.CodeCoverageScanner
-
public class CodeCoverageScanner extends Object
Class used to initiate a Code Coverage scan. This class will utilize the Topaz command line interface to do the scan.
-
-
Constructor Summary
Constructors Constructor Description CodeCoverageScanner(CodeCoverageBuilder config)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Properties
buildAnalysisProperties(String analysisPropertiesFilePath, String analysisPropertiesStr, hudson.FilePath workspace, PrintStream logger)
Builds and returns a list of properties using the given analysis file path and string.void
perform(hudson.model.Run<?,?> run, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener)
Performs the Code Coverage scan.
-
-
-
Constructor Detail
-
CodeCoverageScanner
public CodeCoverageScanner(CodeCoverageBuilder config)
Constructor.- Parameters:
config
- theCodeCoverageBuilder
to use for the scan
-
-
Method Detail
-
perform
public void perform(hudson.model.Run<?,?> run, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener) throws IOException, InterruptedException
Performs the Code Coverage scan.- Parameters:
run
- the current running Jenkins buildworkspace
- the Jenkins job workspace directorylauncher
- the way to start a processlistener
- the build listener- Throws:
IOException
- if an error occurs performing the scanInterruptedException
- if the user cancels the scan
-
buildAnalysisProperties
protected Properties buildAnalysisProperties(String analysisPropertiesFilePath, String analysisPropertiesStr, hudson.FilePath workspace, PrintStream logger)
Builds and returns a list of properties using the given analysis file path and string.Properties in the given string take precedence over properties in the file located at the given path.
- Parameters:
analysisPropertiesFilePath
- theString
path of a file containing analysis propertiesanalysisPropertiesStr
- theString
containing analysis propertiesworkspace
- the workspace directorylogger
- thePrintStream
to use for capturing log statements- Returns:
- the built
Properties
-
-