Package com.lazerycode.jmeter.mojo
Class CheckResultsMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.lazerycode.jmeter.mojo.AbstractJMeterMojo
-
- com.lazerycode.jmeter.mojo.CheckResultsMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="results", defaultPhase=VERIFY) public class CheckResultsMojo extends AbstractJMeterMojoGoal that computes successes/failures from CSV or XML results files.
This goal runs within Lifecycle phaseLifecyclePhase.VERIFY.
Ensure you set 'scanResultsForSuccessfulRequests' and 'scanResultsForFailedRequests' to true.
-
-
Field Summary
Fields Modifier and Type Field Description protected floaterrorRateThresholdInPercentSets the error rate threshold limit for build to get failed, i.e if its set to 3 then build fails only if the % of failed requests are above 3 defaults to 0protected booleanfailBuildIfResultFileIsEmptyIf the plugin cannot detect any requests in the results file force a build failure Defaults to falseprotected List<String>failureMessageslist of case insensitive failure messages to search for.protected booleanignoreResultFailuresSets whether build should fail if there are failed requests found in the JMeter result file.protected booleanonlyFailWhenMatchingFailureMessageOnly search for specific failure messages when scanning results for failed requests (only applied to CSV files) Defaults to falseprotected booleanscanResultsForFailedRequestsSets whether ResultScanner should search for failed requests in the JMeter result file.protected booleanscanResultsForSuccessfulRequestsSets whether ResultScanner should search for Successful requests in the JMeter result file.-
Fields inherited from class com.lazerycode.jmeter.mojo.AbstractJMeterMojo
appendResultsTimestamp, confFilesDirectory, customPropertiesFiles, DEFAULT_CONFIG_EXECUTION_ID, doNotFailBuildIfJVMIsKilled, generateReports, JMETER_ARTIFACT_NAME, JMETER_ARTIFACT_PREFIX, JMETER_CONFIG_ARTIFACT_NAME, jMeterProcessJVMSettings, JORPHAN_ARTIFACT_NAME, LINE_SEPARATOR, logsDirectory, mojoExecution, overrideRootLogLevel, postTestPauseInSeconds, projectBuildDirectory, proxyConfig, remoteConfig, reportDirectory, resultsDirectory, resultsFileNameDateFormat, selectedConfiguration, session, settings, skipTests, suppressJMeterOutput, testConfig, testConfigFile, testFilesBuildDirectory, testFilesDirectory, testFilesExcluded, testFilesIncluded, testResultsTimestamp, useMavenProxy
-
-
Constructor Summary
Constructors Constructor Description CheckResultsMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoExecute()Scan JMeter result files for successful, and failed requests/-
Methods inherited from class com.lazerycode.jmeter.mojo.AbstractJMeterMojo
computeJMeterArgumentsArray, execute, loadMavenProxy
-
-
-
-
Field Detail
-
ignoreResultFailures
@Parameter(defaultValue="false") protected boolean ignoreResultFailures
Sets whether build should fail if there are failed requests found in the JMeter result file. Failures are for example failed requests
-
scanResultsForFailedRequests
@Parameter(defaultValue="true") protected boolean scanResultsForFailedRequests
Sets whether ResultScanner should search for failed requests in the JMeter result file. Defaults to false
-
errorRateThresholdInPercent
@Parameter(defaultValue="0") protected float errorRateThresholdInPercent
Sets the error rate threshold limit for build to get failed, i.e if its set to 3 then build fails only if the % of failed requests are above 3 defaults to 0
-
scanResultsForSuccessfulRequests
@Parameter(defaultValue="true") protected boolean scanResultsForSuccessfulRequests
Sets whether ResultScanner should search for Successful requests in the JMeter result file. Defaults to false
-
onlyFailWhenMatchingFailureMessage
@Parameter(defaultValue="false") protected boolean onlyFailWhenMatchingFailureMessage
Only search for specific failure messages when scanning results for failed requests (only applied to CSV files) Defaults to false
-
failBuildIfResultFileIsEmpty
@Parameter(defaultValue="false") protected boolean failBuildIfResultFileIsEmpty
If the plugin cannot detect any requests in the results file force a build failure Defaults to false
-
-
Method Detail
-
doExecute
public void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionScan JMeter result files for successful, and failed requests/- Specified by:
doExecutein classAbstractJMeterMojo- Throws:
org.apache.maven.plugin.MojoExecutionException- Exceptionorg.apache.maven.plugin.MojoFailureException- Exception
-
-