public abstract class AbstractJMeterMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
appendResultsTimestamp
Append the results timestamp to the filename
(It will be prepended by default if testResultsTimestamp is set to true)
|
protected List<File> |
customPropertiesFiles
Absolute path to JMeter custom (test dependent) properties file.
|
protected File |
jmeterDirectory
Place where the JMeter files will be generated.
|
protected JMeterProcessJVMSettings |
jMeterProcessJVMSettings
Value class that wraps all JMeter Process JVM settings.
|
protected String |
logConfigFilename
Name of advanced logging configuration file that is in the
|
protected File |
logsDirectory
Set the directory that JMeter logs are saved to.
|
protected org.apache.maven.plugin.MojoExecution |
mojoExecution
The information extracted from the Mojo being currently executed
|
protected String |
overrideRootLogLevel
Set a root log level to override all log levels used by JMeter
Valid log levels are: FATAL_ERROR, ERROR, WARN, INFO, DEBUG (They are not case sensitive);
If you try to set an invalid log level it will be ignored
|
protected String |
postTestPauseInSeconds
Set a pause in seconds after each test that is run.
|
protected static Map<ConfigurationFiles,PropertiesMapping> |
propertiesMap |
protected ProxyConfiguration |
proxyConfig
Value class that wraps all proxy configurations.
|
protected RemoteConfiguration |
remoteConfig
Value class that wraps all remote configurations.
|
protected File |
resultsDirectory
Set the directory that JMeter results are saved to.
|
protected String |
resultsFileNameDateFormat
Set the format of the timestamp that is appended to the results filename.
|
protected static String |
runtimeJarName |
protected org.apache.maven.settings.Settings |
settings
Maven settings
|
protected boolean |
skipTests
Skip the JMeter tests
|
protected boolean |
suppressJMeterOutput
Suppress JMeter output
|
protected static JMeterArgumentsArray |
testArgs |
protected String |
testConfigFile
The filename used to store the results config
|
protected File |
testFilesBuildDirectory
Set the directory that JMeter test files are copied into as part of the build.
|
protected File |
testFilesDirectory
Path under which JMX files are stored.
|
protected List<String> |
testFilesExcluded
Sets the list of exclude patterns to use in directory scan for JMX files.
|
protected List<String> |
testFilesIncluded
Sets the list of include patterns to use in directory scan for JMX files.
|
protected boolean |
testResultsTimestamp
Timestamp the test results.
|
protected boolean |
useMavenProxy
Use maven proxy configuration if no specific proxy configuration provided
|
protected static File |
workingDirectory |
| Constructor and Description |
|---|
AbstractJMeterMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doExecute() |
void |
execute() |
protected void |
initialiseJMeterArgumentsArray(boolean disableGUI,
boolean isCSVFormat)
Generate the initial JMeter Arguments array that is used to create the command line that we pass to JMeter.
|
protected void |
loadMavenProxy()
Try to load the active maven proxy.
|
@Parameter protected List<String> testFilesIncluded
@Parameter protected List<String> testFilesExcluded
@Parameter(defaultValue="${basedir}/src/test/jmeter")
protected File testFilesDirectory
@Parameter(defaultValue="true") protected boolean testResultsTimestamp
@Parameter(defaultValue="false") protected boolean appendResultsTimestamp
@Parameter protected String resultsFileNameDateFormat
@Parameter(defaultValue="${project.build.directory}/jmeter/results")
protected File resultsDirectory
@Parameter(defaultValue="${project.build.directory}/jmeter/testFiles")
protected File testFilesBuildDirectory
@Parameter(defaultValue="${project.build.directory}/jmeter/logs")
protected File logsDirectory
@Parameter protected List<File> customPropertiesFiles
@Parameter protected boolean useMavenProxy
@Parameter(defaultValue="${settings}",
readonly=true)
protected org.apache.maven.settings.Settings settings
@Parameter protected ProxyConfiguration proxyConfig
@Parameter protected RemoteConfiguration remoteConfig
@Parameter protected JMeterProcessJVMSettings jMeterProcessJVMSettings
@Parameter protected String overrideRootLogLevel
@Parameter(defaultValue="logkit.xml") protected String logConfigFilename
@Parameter(defaultValue="false") protected boolean suppressJMeterOutput
@Parameter(defaultValue="${mojoExecution}",
required=true,
readonly=true)
protected org.apache.maven.plugin.MojoExecution mojoExecution
@Parameter(defaultValue="${skipTests}")
protected boolean skipTests
@Parameter(defaultValue="0") protected String postTestPauseInSeconds
@Parameter(defaultValue="${project.build.directory}/config.json")
protected String testConfigFile
@Parameter(defaultValue="${project.build.directory}/jmeter")
protected transient File jmeterDirectory
protected static String runtimeJarName
protected static JMeterArgumentsArray testArgs
protected static File workingDirectory
protected static Map<ConfigurationFiles,PropertiesMapping> propertiesMap
public final void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected abstract void doExecute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected void initialiseJMeterArgumentsArray(boolean disableGUI,
boolean isCSVFormat)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void loadMavenProxy()
Copyright © 2017. All rights reserved.