Skip to content

JMeter ^3.0.1

Introduction

smart-doc has supported the generation of JMeter performance testing from version 3.0.1, providing test capabilities.

Generating JMeter Scripts

Usually, smart-doc is integrated during development to generate documentation. You can directly use the Mojo or Task of the Maven or Gradle plugin to generate the JMeter performance testing script. After running, you will get an .jmx document that can be imported into JMeter. Currently, the generated scripts are relatively simple and lack high-level function support.

For details on how to use the maven plugin, please refer to:

idea-jmeter

Starting from version 3.0.4, the community has introduced the feature to add a Prometheus Listener. To enable this feature, you need to add the addPrometheusListener configuration option in smart-doc.json.

json
{
  "jmeter": {
    "addPrometheusListener": true
  }
}

Importing JMeter

  • First, download the latest JMeter from the Apache official website, JMeter Download
  • Start JMeter. Start JMeter according to your system. Usually, for Mac or Linux, you can start it directly with the jmeter.sh script.

After importing the script generated by smart-doc into JMeter, you can adjust it according to your needs and then perform testing.

jmeter-example.png

Released under the MIT License.