public abstract class JMeterAbstractMojo
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 File |
binDir
Other directories will be created by this plugin and used by JMeter
|
protected File |
customPropertiesFile
Absolute path to JMeter custom (test dependent) properties file.
|
protected boolean |
ignoreResultFailures
Sets whether FailureScanner should ignore failures in JMeter result file.
|
protected String |
jmeterConfigArtifact
All property files are stored in this artifact, comes with JMeter library
|
protected Set<JMeterPlugins> |
jmeterPlugins
Value class that wraps all remote configurations.
|
protected JMeterProcessJVMSettings |
jMeterProcessJVMSettings
Value class that wraps all JMeter Process JVM settings.
|
protected Set<JMeterPlugins> |
junitLibraries
Value class that wraps all remote configurations.
|
protected File |
libDir |
protected File |
libExtDir |
protected File |
libJUnitDir |
protected String |
logConfigFilename
Name of advanced logging configuration file that is in the
|
protected File |
logsDir |
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 List<org.apache.maven.artifact.Artifact> |
pluginArtifacts
Get a list of artifacts used by this plugin
|
protected PropertyHandler |
pluginProperties |
protected File |
propertiesFilesDirectory
Path under which .properties files are stored.
|
protected Map<String,String> |
propertiesGlobal
JMeter Global Properties that override those given in jmeterProps.
|
protected Map<String,String> |
propertiesJMeter
Absolute path to JMeter custom (test dependent) properties file.
|
protected boolean |
propertiesReplacedByCustomFiles
Replace the default JMeter properties with any custom properties files supplied.
|
protected Map<String,String> |
propertiesSaveService
JMeter Properties that are merged with precedence into default JMeter file in saveservice.properties
|
protected Map<String,String> |
propertiesSystem
(Java) System properties set for the test run.
|
protected Map<String,String> |
propertiesUpgrade
JMeter Properties that are merged with precedence into default JMeter file in upgrade.properties
|
protected Map<String,String> |
propertiesUser
JMeter Properties that are merged with precedence into default JMeter file in user.properties
user.properties takes precedence over jmeter.properties
|
protected ProxyConfiguration |
proxyConfig
Value class that wraps all proxy configurations.
|
protected RemoteConfiguration |
remoteConfig
Value class that wraps all remote configurations.
|
protected File |
resultsDir |
protected String |
resultsDirectory
Set the directory that JMeter results are saved to.
|
protected String |
resultsFileFormat
Set the format of the results generated by JMeter
Valid values are: xml, csv (XML set by default).
|
protected String |
resultsFileNameDateFormat
Set the format of the timestamp that is appended to the results filename.
|
protected boolean |
resultsOutputIsCSVFormat |
protected boolean |
skipTests
Skip the JMeter tests
|
protected boolean |
suppressJMeterOutput
Suppress JMeter output
|
protected JMeterArgumentsArray |
testArgs |
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 File |
workDir
Place where the JMeter files will be generated.
|
| Constructor and Description |
|---|
JMeterAbstractMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureAdvancedLogging() |
protected void |
generateJMeterDirectoryTree()
Generate the directory tree utilised by JMeter.
|
protected org.apache.maven.artifact.Artifact |
getArtifactNamed(String artifactName)
Search the list of plugin artifacts for an artifact with a specific name
|
protected void |
initialiseJMeterArgumentsArray(boolean disableGUI)
Generate the initial JMeter Arguments array that is used to create the command line that we pass to JMeter.
|
protected boolean |
isArtifactAJMeterDependency(org.apache.maven.artifact.Artifact artifact)
Work out if an artifact is a JMeter dependency
|
protected boolean |
isArtifactAnExplicitDependency(org.apache.maven.artifact.Artifact artifact)
Check if the given artifact is needed by an explicit dependency (a dependency, that is explicitly defined in
the pom of the project using the jmeter-maven-plugin).
|
protected boolean |
isArtifactMarkedAsAJMeterPlugin(org.apache.maven.artifact.Artifact artifact) |
protected boolean |
isArtifactMarkedAsAJUnitLib(org.apache.maven.artifact.Artifact artifact) |
protected void |
populateJMeterDirectoryTree()
Create the JMeter directory tree and copy all compile time JMeter dependencies into it.
|
protected void |
propertyConfiguration() |
protected void |
setJMeterResultFileFormat() |
getLog, getPluginContext, setLog, setPluginContext@Parameter protected List<String> testFilesIncluded
@Parameter protected List<String> testFilesExcluded
@Parameter(defaultValue="${basedir}/src/test/jmeter")
protected File testFilesDirectory
@Parameter(defaultValue="${basedir}/src/test/jmeter")
protected File propertiesFilesDirectory
@Parameter(defaultValue="true") protected boolean testResultsTimestamp
@Parameter(defaultValue="false") protected boolean appendResultsTimestamp
@Parameter protected String resultsFileNameDateFormat
@Parameter(defaultValue="xml") protected String resultsFileFormat
@Parameter protected String resultsDirectory
@Parameter protected Map<String,String> propertiesJMeter
@Parameter protected Map<String,String> propertiesSaveService
@Parameter protected Map<String,String> propertiesUpgrade
@Parameter protected Map<String,String> propertiesUser
@Parameter protected Map<String,String> propertiesGlobal
@Parameter protected Map<String,String> propertiesSystem
@Parameter protected File customPropertiesFile
@Parameter(defaultValue="true") protected boolean propertiesReplacedByCustomFiles
@Parameter protected ProxyConfiguration proxyConfig
@Parameter protected RemoteConfiguration remoteConfig
@Parameter protected Set<JMeterPlugins> jmeterPlugins
@Parameter protected Set<JMeterPlugins> junitLibraries
@Parameter protected JMeterProcessJVMSettings jMeterProcessJVMSettings
@Parameter protected String overrideRootLogLevel
@Parameter(defaultValue="logkit.xml") protected String logConfigFilename
@Parameter(defaultValue="false") protected boolean ignoreResultFailures
@Parameter(defaultValue="true") protected boolean suppressJMeterOutput
@Parameter(defaultValue="${plugin.artifacts}",
required=true,
readonly=true)
protected List<org.apache.maven.artifact.Artifact> pluginArtifacts
@Parameter(defaultValue="${mojoExecution}",
required=true,
readonly=true)
protected org.apache.maven.plugin.MojoExecution mojoExecution
@Parameter(defaultValue="false") protected boolean skipTests
@Parameter(defaultValue="${project.build.directory}/jmeter")
protected transient File workDir
protected File binDir
protected File libDir
protected File libExtDir
protected File libJUnitDir
protected File logsDir
protected File resultsDir
protected final String jmeterConfigArtifact
protected JMeterArgumentsArray testArgs
protected PropertyHandler pluginProperties
protected boolean resultsOutputIsCSVFormat
protected void generateJMeterDirectoryTree()
protected void propertyConfiguration()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void populateJMeterDirectoryTree()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected boolean isArtifactMarkedAsAJMeterPlugin(org.apache.maven.artifact.Artifact artifact)
protected boolean isArtifactMarkedAsAJUnitLib(org.apache.maven.artifact.Artifact artifact)
protected boolean isArtifactAnExplicitDependency(org.apache.maven.artifact.Artifact artifact)
artifact - Artifact to examineprotected boolean isArtifactAJMeterDependency(org.apache.maven.artifact.Artifact artifact)
artifact - Artifact to examineprotected org.apache.maven.artifact.Artifact getArtifactNamed(String artifactName) throws org.apache.maven.plugin.MojoExecutionException
artifactName - org.apache.maven.plugin.MojoExecutionExceptionprotected void initialiseJMeterArgumentsArray(boolean disableGUI)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void setJMeterResultFileFormat()
protected void configureAdvancedLogging()
throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureExceptionCopyright © 2015. All Rights Reserved.