Class CheckResultsMojo

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

    @Mojo(name="results",
          defaultPhase=VERIFY)
    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

        @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
      • failureMessages

        @Parameter
        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,
                              org.apache.maven.plugin.MojoFailureException
        Scan JMeter result files for successful, and failed requests/
        Specified by:
        doExecute in class AbstractJMeterMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException - Exception
        org.apache.maven.plugin.MojoFailureException - Exception