Class CheckResultsMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    public class CheckResultsMojo
    extends AbstractJMeterMojo
    Goal that computes successes/failures from CSV or XML results files.
    This goal runs within Lifecycle phase LifecyclePhase.VERIFY.
    Ensure you set 'scanResultsForSuccessfulRequests' and 'scanResultsForFailedRequests' to true.
    • Field Detail

      • ignoreResultFailures

        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

        protected boolean scanResultsForFailedRequests
        Sets whether ResultScanner should search for failed requests in the JMeter result file. Defaults to false
      • errorRateThresholdInPercent

        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

        protected boolean scanResultsForSuccessfulRequests
        Sets whether ResultScanner should search for Successful requests in the JMeter result file. Defaults to false
      • onlyFailWhenMatchingFailureMessage

        protected boolean onlyFailWhenMatchingFailureMessage
        Only search for specific failure messages when scanning results for failed requests (only applied to CSV files) Defaults to false
      • failBuildIfResultFileIsEmpty

        protected boolean failBuildIfResultFileIsEmpty
        If the plugin cannot detect any requests in the results file force a build failure Defaults to false
      • failureMessages

        protected List<String> failureMessages
        list of case insensitive failure messages to search for. (Requires <onlyFailWhenMatchingFailureMessage>true</onlyFailWhenMatchingFailureMessage> to be set)
    • Constructor Detail

      • CheckResultsMojo

        public CheckResultsMojo()
    • Method Detail

      • doExecute

        public void doExecute()
                       throws org.apache.maven.plugin.MojoExecutionException,
        Scan JMeter result files for successful, and failed requests/
        Specified by:
        doExecute in class AbstractJMeterMojo
        org.apache.maven.plugin.MojoExecutionException - Exception
        org.apache.maven.plugin.MojoFailureException - Exception