Class AbstractJMeterMojo

    • Field Detail

      • testFilesIncluded

        @Parameter
        protected List<String> testFilesIncluded
        Sets the list of include patterns to use in directory scan for JMX files. Relative to testFilesDirectory.
      • testFilesExcluded

        @Parameter
        protected List<String> testFilesExcluded
        Sets the list of exclude patterns to use in directory scan for JMX files. Relative to testFilesDirectory.
      • confFilesDirectory

        @Parameter(defaultValue="${basedir}/src/test/conf")
        protected File confFilesDirectory
        Path under which .conf files are stored.
      • testFilesDirectory

        @Parameter(defaultValue="${basedir}/src/test/jmeter")
        protected File testFilesDirectory
        Path under which JMX files are stored.
      • testResultsTimestamp

        @Parameter(defaultValue="true")
        protected boolean testResultsTimestamp
        Timestamp the test results.
      • appendResultsTimestamp

        @Parameter(defaultValue="false")
        protected boolean appendResultsTimestamp
        Append the results timestamp to the filename (It will be prepended by default if testResultsTimestamp is set to true)
      • resultsFileNameDateFormat

        @Parameter
        protected String resultsFileNameDateFormat
        Set the format of the timestamp that is appended to the results filename. (This assumes that testResultsTimestamp is set to 'true') For formatting see http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html
      • generateReports

        @Parameter(defaultValue="false")
        protected boolean generateReports
        Generate JMeter Reports (this will force your .jtl's into .csv mode)
      • doNotFailBuildIfJVMIsKilled

        @Parameter(defaultValue="false")
        protected boolean doNotFailBuildIfJVMIsKilled
        Do not fail the build if the JMeter JVM is force killed. The JVM is normally killed forcibly because you ran out of memory, or the process running inside it stopped responding. Make sure you investigate the above before reaching for this option!
      • resultsDirectory

        @Parameter(defaultValue="${project.build.directory}/jmeter/results")
        protected File resultsDirectory
        TODO Dynamic Set the directory that JMeter results are saved to.
      • reportDirectory

        @Parameter(defaultValue="${project.build.directory}/jmeter/reports")
        protected File reportDirectory
        TODO Dynamic Set the directory that JMeter reports are saved to.
      • logsDirectory

        @Parameter(defaultValue="${project.build.directory}/jmeter/logs")
        protected File logsDirectory
        TODO Dynamic Set the directory that JMeter logs are saved to.
      • testFilesBuildDirectory

        @Parameter(defaultValue="${project.build.directory}/jmeter/testFiles")
        protected File testFilesBuildDirectory
        TODO Dynamic Set the directory that JMeter test files are copied into as part of the build.
      • customPropertiesFiles

        @Parameter
        protected List<File> customPropertiesFiles
        Absolute path to JMeter custom (test dependent) properties file.
      • useMavenProxy

        @Parameter
        protected boolean useMavenProxy
        Use maven proxy configuration if no specific proxy configuration provided
      • settings

        @Parameter(defaultValue="${settings}",
                   readonly=true)
        protected org.apache.maven.settings.Settings settings
        Maven settings
      • proxyConfig

        @Parameter
        protected ProxyConfiguration proxyConfig
        Value class that wraps all proxy configurations.
      • remoteConfig

        @Parameter(defaultValue="${remoteConfig}")
        protected RemoteConfiguration remoteConfig
        Value class that wraps all remote configurations.
      • jMeterProcessJVMSettings

        @Parameter(defaultValue="${jMeterProcessJVMSettings}")
        protected JMeterProcessJVMSettings jMeterProcessJVMSettings
        Value class that wraps all JMeter Process JVM settings.
      • overrideRootLogLevel

        @Parameter
        protected String overrideRootLogLevel
        Set a root log level to override all log levels used by JMeter Valid log levels are: ERROR, WARN, INFO, DEBUG (They are not case sensitive); If you try to set an invalid log level it will be ignored
      • suppressJMeterOutput

        @Parameter(defaultValue="false")
        protected boolean suppressJMeterOutput
        Suppress JMeter output
      • mojoExecution

        @Parameter(defaultValue="${mojoExecution}",
                   required=true,
                   readonly=true)
        protected org.apache.maven.plugin.MojoExecution mojoExecution
        The information extracted from the Mojo being currently executed
      • session

        @Parameter(defaultValue="${session}",
                   readonly=true)
        protected org.apache.maven.execution.MavenSession session
      • skipTests

        @Parameter(defaultValue="${skipTests}")
        protected boolean skipTests
        Skip the JMeter tests
      • postTestPauseInSeconds

        @Parameter(defaultValue="0")
        protected String postTestPauseInSeconds
        Set a pause in seconds after each test that is run.
      • testConfigFile

        @Parameter(defaultValue="${project.build.directory}/config.json")
        protected String testConfigFile
        The filename used to store the results config
      • selectedConfiguration

        @Parameter(property="selectConfiguration",
                   defaultValue="configuration")
        protected String selectedConfiguration
        The filename used to store the results config
      • projectBuildDirectory

        @Parameter(defaultValue="${project.build.directory}")
        protected File projectBuildDirectory
        The project build directory
    • Constructor Detail

      • AbstractJMeterMojo

        public AbstractJMeterMojo()
    • Method Detail

      • execute

        public final void execute()
                           throws org.apache.maven.plugin.MojoExecutionException,
                                  org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • doExecute

        protected abstract void doExecute()
                                   throws org.apache.maven.plugin.MojoExecutionException,
                                          org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • computeJMeterArgumentsArray

        protected JMeterArgumentsArray computeJMeterArgumentsArray​(boolean disableGUI,
                                                                   boolean isCSVFormat,
                                                                   String jmeterDirectoryPath)
                                                            throws org.apache.maven.plugin.MojoExecutionException
        Generate the initial JMeter Arguments array that is used to create the command line that we pass to JMeter.
        Parameters:
        disableGUI - Prevent JMeter gGUI from starting up
        isCSVFormat - Determines if results output is in CSV formate of legacy JTL format
        jmeterDirectoryPath - Path to the JMeter directory
        Returns:
        Throws:
        org.apache.maven.plugin.MojoExecutionException - If unable to generate arguments array
      • loadMavenProxy

        protected void loadMavenProxy()
        Try to load the active maven proxy.