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 File |
confFilesDirectory
Path under which .conf files are stored.
|
protected List<File> |
customPropertiesFiles
Absolute path to JMeter custom (test dependent) properties file.
|
protected String |
eventScheduleScript
Perfana: schedule script with events, one event per line, such as: PT1M|scale-down|replicas=2
|
protected boolean |
generateReports
Generate JMeter Reports (this will force your .jtl's into .csv mode)
|
protected static String |
JMETER_ARTIFACT_NAME |
protected static String |
JMETER_ARTIFACT_PREFIX |
protected static String |
JMETER_CONFIG_ARTIFACT_NAME |
protected static String |
JMETER_GROUP_ID |
protected File |
jmeterDirectory
Place where the JMeter files will be generated.
|
protected JMeterProcessJVMSettings |
jMeterProcessJVMSettings
Value class that wraps all JMeter Process JVM settings.
|
protected static String |
JORPHAN_ARTIFACT_NAME |
protected static String |
LINE_SEPARATOR |
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: ERROR, WARN, INFO, DEBUG (They are not case sensitive);
If you try to set an invalid log level it will be ignored
|
protected String |
perfanaAnnotations
Perfana: test run annotiations passed via environment variable
|
protected String |
perfanaApplication
Perfana: Name of application that is being tested.
|
protected String |
perfanaApplicationRelease
Perfana: the release number of the application.
|
protected boolean |
perfanaAssertResultsEnabled
Perfana: Parse the Perfana test asserts and fail build it not ok.
|
protected String |
perfanaCIBuildResultsUrl
Perfana: Build results url where to find the results of this load test.
|
protected String |
perfanaConstantLoadTimeInSeconds
Perfana: Constant load time in seconds.
|
protected boolean |
perfanaEnabled
Perfana: Enable calls to Perfana.
|
protected Map<String,Properties> |
perfanaEventProperties
Perfana: properties for perfana event implementations
|
protected String |
perfanaRampupTimeInSeconds
Perfana: Rampup time in seconds.
|
protected String |
perfanaTestEnvironment
Perfana: Test environment for this test.
|
protected String |
perfanaTestRunId
Perfana: Test run id.
|
protected String |
perfanaTestType
Perfana: Test type for this test.
|
protected String |
perfanaUrl
Perfana: Perfana url.
|
protected Properties |
perfanaVariables
Perfana: test run variables passed via environment variable
|
protected String |
postTestPauseInSeconds
Set a pause in seconds after each test that is run.
|
protected File |
projectBuildDirectory
The project build directory
|
protected ProxyConfiguration |
proxyConfig
Value class that wraps all proxy configurations.
|
protected RemoteConfiguration |
remoteConfig
Value class that wraps all remote configurations.
|
protected File |
reportDirectory
Set the directory that JMeter reports are saved to.
|
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 org.apache.maven.settings.Settings |
settings
Maven settings
|
protected boolean |
skipTests
Skip the JMeter tests
|
protected boolean |
suppressJMeterOutput
Suppress JMeter output
|
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
|
| Constructor and Description |
|---|
AbstractJMeterMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected JMeterArgumentsArray |
computeJMeterArgumentsArray(boolean disableGUI,
boolean isCSVFormat)
Generate the initial JMeter Arguments array that is used to create the command line that we pass to JMeter.
|
protected abstract void |
doExecute() |
void |
execute() |
protected void |
loadMavenProxy()
Try to load the active maven proxy.
|
protected static final String LINE_SEPARATOR
protected static final String JMETER_ARTIFACT_PREFIX
protected static final String JMETER_ARTIFACT_NAME
protected static final String JMETER_CONFIG_ARTIFACT_NAME
protected static final String JORPHAN_ARTIFACT_NAME
protected static final String JMETER_GROUP_ID
@Parameter protected List<String> testFilesIncluded
@Parameter protected List<String> testFilesExcluded
@Parameter(defaultValue="${basedir}/src/test/conf")
protected File confFilesDirectory
@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="true") protected boolean generateReports
@Parameter(defaultValue="${project.build.directory}/jmeter/reports")
protected File reportDirectory
@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="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 File jmeterDirectory
@Parameter(defaultValue="${project.build.directory}")
protected File projectBuildDirectory
@Parameter(defaultValue="UNKNOWN_APPLICATION") protected String perfanaApplication
@Parameter(defaultValue="UNKNOWN_TEST_TYPE") protected String perfanaTestType
@Parameter(defaultValue="UNKNOWN_TEST_ENVIRONMENT") protected String perfanaTestEnvironment
@Parameter(defaultValue="UNKNOWN_TEST_RUN_ID") protected String perfanaTestRunId
@Parameter protected String perfanaCIBuildResultsUrl
@Parameter(defaultValue="UNKNOWN_PERFANA_URL") protected String perfanaUrl
@Parameter(defaultValue="UNKNOWN_APPLICATION_RELEASE") protected String perfanaApplicationRelease
@Parameter(defaultValue="0") protected String perfanaRampupTimeInSeconds
@Parameter(defaultValue="120") protected String perfanaConstantLoadTimeInSeconds
@Parameter(defaultValue="false") protected boolean perfanaAssertResultsEnabled
@Parameter(defaultValue="false") protected boolean perfanaEnabled
@Parameter protected String perfanaAnnotations
@Parameter protected Properties perfanaVariables
@Parameter protected Map<String,Properties> perfanaEventProperties
@Parameter protected String eventScheduleScript
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 JMeterArgumentsArray computeJMeterArgumentsArray(boolean disableGUI, boolean isCSVFormat) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void loadMavenProxy()
Copyright © 2018–2019. All rights reserved.