APDEX Score Calculator - rbourga/rbourga-jmeter-plugins GitHub Wiki

Introduction

This JMeter plugin calculates the Apdex Scores of samplers from a JMeter test results file. It lets you specifiy a threshold that will be used for a pass/fail test. It presents the results in a table so that this helps you in deciding how close or far your application is from your SLAs.

Apdex

Given a Tolerated threshold that you specify, the Application Performance Index Apdex returns a score between 0 and 1. It defines ratings from "Unacceptable" up to "Excellent" which will help you find out where your application stands out depending on its score:

Apdex Rating vs Score

Recommendation

Any outliers in the raw results file can skew the APDEX score, leading to an inaccurate representation of typical user experience. That's why we recommend removing upper outliers using the Outlier Detector plugin to improve the relevance of the APDEX metric. By running the APDEX analysis on the "_clean" results file, you focus on the bulk of user experiences, excluding rare, extreme cases.

However, if outliers are suspected to be caused by systemic issues (e.g., server overloads), you can still calculate the APDEX on the original results file to reflect a worst-case scenario.

Usage

Via the GUI

Adding the calculator to a Test Plan

Add the plugin to a Test Plan via the "Add > Non-Test Elements" menu and select then "Apdex Score Calculator".

Apdex GUI

Specify the input fields

  • Apdex Target Threshold T (in seconds): default value is 4s. If your target threshold is in milliseconds, then convert it to seconds before entering T. For instance, if you want to check APIs against a threshold of 500ms, enter T as "0.5".
  • Filename: JMeter results file you want to analyze.

Specify your pass/fail criteria

  • Apdex Acceptable Quality Level: minimum score to pass (default is 0.85).

Any samplers where their Apdex or CoV scores do not meet these criteria shall be marked as "failed" in the results table. By changing the default values, you can be more or less forgiving.

Press the Calculate button

The plugin parses the data and shows the results in a grid with their Apdex ratings. When the number of samples is less than 100, the plugin will mark them as "Small Group" as a precaution.

Save the calculation results in a CSV file

By clicking on the "Save" button, the plugin will copy the results into a csv file with a suffix of "_ApdexScores.csv" to the input filename which you can then import into your final test report.

Via Command line

In a script or in a Windows Powershell window, you can call the tool with the following command:

java -jar $env:JMETER_HOME\lib\cmdrunner-x.y.jar --tool Apdex --input-file {filenameIn} --apdex-tgt-thold-secs {T} --apdex-aql {ApdexMin}

where:

  • cmdrunner-x.y.jar: version of the cmdrunner you have in your jmeter/lib directory;
  • --input-file: full path to your JMeter results file;
  • --apdex-tgt-thold-secs: your Apdex Satisfied Threshold T in seconds;
  • --apdex-aql: your minimum Apdex score to pass (any number between 0 and 1);

The tool will save the results of the computation in an HTML file with a suffix of "_ApdexScores.html" to the input filename which can be imported into CI/CD tools. It will return the number of failed samplers in the exit code, allowing to fail the build step in the CI/CD tool if the build process of the tool uses a non zero exit code as a failed indicator.

See also