Class 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 Detail

      • CodeCoverageScanner

        public CodeCoverageScanner​(CodeCoverageBuilder config)
        Constructor.
        Parameters:
        config - the CodeCoverageBuilder 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 build
        workspace - the Jenkins job workspace directory
        launcher - the way to start a process
        listener - the build listener
        Throws:
        IOException - if an error occurs performing the scan
        InterruptedException - 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 - the String path of a file containing analysis properties
        analysisPropertiesStr - the String containing analysis properties
        workspace - the workspace directory
        logger - the PrintStream to use for capturing log statements
        Returns:
        the built Properties