On this article, we are going to stroll you thru the way to conduct a load take a look at and analyze the outcomes utilizing Java Maven expertise. We’ll protecting the whole lot from launching the take a look at to producing informative graphs and tables.
For this demonstration, we’ll make the most of numerous recordsdata, together with Venture Object Mannequin (POM) recordsdata, JMeters scripts, and CSV knowledge, from the jpetstore_loadtesting_dzone venture obtainable on GitHub. This may assist illustrate the steps concerned and the performance of the required plugins and instruments. Yow will discover the venture right here: https://github.com/vdaburon/jpetstore_loadtesting_dzone.
The online software being examined is a widely known software referred to as JPetStore, which you’ll additional discover at https://github.com/mybatis/jpetstore-6.
Benefits of This Answer for Launching and Analyzing Assessments
The small print of the way to implement this resolution and the main points of Maven launches shall be coated within the subsequent chapters. For now, let’s spotlight the important thing benefits:
- For Set up
- There isn’t any must pre-install Apache JMeter to conduct the load checks, because the JMeter Maven Plugin mechanically fetches the Apache JMeter instrument and the required plugins from the Maven Central Repository.
- The file paths used are relative to the Maven venture, which suggests they will range throughout completely different machines through the growth section and in Steady Integration setups.
- For Steady Integration
- This resolution seamlessly integrates into Steady Integration pipelines (akin to Jenkins and GitLab). Assessments could be simply run on a Jenkins node or a GitLab Runner, making it accessible for each builders and testers.
- Efficiency graphs from working system or Java monitoring instruments could be simply added utilizing monitoring instruments like nmon + nmon visualizer for Linux environments.
- For Builders and Testers
- Java builders and testers conversant in Maven will really feel comfy with the pom.xml recordsdata and Git.
- The load testing venture is managed like a typical Java Maven venture inside the Built-in Improvement Environments (IDEs) akin to IntelliJ, Eclipse, and Visible Studio.
- The assorted recordsdata (POM, JMeter script, CSV knowledge) could be version-controlled utilizing Git or different supply management methods.
- The venture’s
README.mdfile (in Markdown format) can function invaluable documentation on the way to run load checks and analyze outcomes, notably in Built-in Management (IC).
- For Evaluation
- The evaluation is quick, as numerous output recordsdata are created in just some minutes.
- Customers can filter outcomes to focus solely on particular pages, excluding the URLs invoked inside them.
- The plugin’s filter instrument permits customers to research outcomes by load steps, operating it a number of instances with completely different begin and finish offset parameters.
- For clearer graphs, customers can filter to current response instances per state of affairs with a manageable variety of curves.
- Customers can power the Y-axis for higher comparability of graphs as a result of they’re on the identical scale, for instance, setting Y = 5000 ms for response instances or from 0 to 100% for CPU utilization.
- Mixture and Synthesis experiences can be found in each CSV format and HTML tables for simple show on a webpage.
- After executing a load take a look at, customers can rapidly evaluate outcomes by way of the generated index.html web page, which offers easy accessibility to graphs and HTML tables.
- The generated HTML web page consists of hyperlinks to file sizes, and clicking on these hyperlinks affords a view of content material, like JMeter logs, in a browser.
- If a selected graph is lacking, customers can create period graphs for every URL referred to as on a web page utilizing the “JMeterPluginsCMD Command Line Device” and “Filter Outcomes Device” from the JMeter outcomes file or instantly by way of JMeter’s Swing GUI interface.
- For Report Era
- Graphs created through the evaluation could be instantly imported into experiences created in Microsoft Phrase or LibreOffice Author codecs.
- CSV experiences could be edited in a spreadsheet software program (Microsoft Excel or LibreOffice Calc), and the formatted values can then be simply copied right into a Phrase or Author report.
- For Archiving
- Archiving outcomes is sort of easy; customers can save the zipped listing containing all the outcomes and analyses.
- This archiving format strategy makes it simple to match completely different load take a look at campaigns.
- The retention interval for outcomes could be in depth, stretching a number of years, because the file format is straightforward and clear; in contrast to knowledge saved in paperwork, relational databases, or temporal databases, it stays simply accessible and comprehensible.
Working a Load Check With Maven and Apache JMeter
In case you’re seeking to run a load take a look at utilizing Apache JMeter, there’s a Maven plugin obtainable for that goal. This plugin is named the jmeter-maven-plugin , and you could find it at its venture URL: https://github.com/jmeter-maven-plugin/jmeter-maven-plugin.
To successfully run your efficiency checks with Java Maven, you want just a few necessities:
- A JDK/JRE model 1.8 or greater (akin to model 17)
- A current model of Maven (3.7 or greater)
- A Maven
pom.xmlfile
One of many nice issues about this setup is that you simply need not set up Apache JMeter beforehand. It is also a good suggestion to have a Git shopper obtainable for fetching essential assets from the repository such because the JMeter script, exterior configuration recordsdata, and any CSV knowledge recordsdata you may want.
For simpler administration, it’s endorsed to take care of two Maven recordsdata:
- The primary Maven file, pom.xml (
pom_01_launch_test.xml), is devoted to launching the efficiency take a look at - The second Maven file, pom.xml (
pom_02_analyse_results.xml), is for analyzing the outcomes
JMeter Maven Plugin Advisable Venture Listing Construction
The Maven venture designed for launching load checks comes with a predefined listing construction. For the jmeter-maven-plugin , this construction could be discovered at: ${venture.base.listing}/src/take a look at/jmeter
On this listing, it’s essential place the next objects:
- The JMeter script (.jmx)
- The dataset recordsdata (.csv)
- Exterior configuration recordsdata referenced within the JMeter script (.properties)
- The JMeter configuration file (person.properties) in case you are utilizing any non-standard properties
The pom.xml File for Launching the Load Check
The primary pom.xml file (pom_01_launch_test.xml) consists of the declaration of the jmeter-maven-plugin with some configuration properties.
4.0.0
io.github.vdaburon
jpetstore-maven-load-test-dzone
1.0
pom
01 - Launch a load take a look at of the JPetstore internet software with the maven plugin
Launch a load take a look at of the JPetstore internet software with the maven plugin
2025
vdaburon
Vincent DABURON
[email protected]
architect
developer
UTF-8
1.8
1.8
5.6.3
256
756
jpetstore
config_test_warm_up.properties
com.lazerycode.jmeter
jmeter-maven-plugin
3.6.1
configuration
configure
jmeter-tests
jmeter
${jmeter.model}
kg.apc:jmeter-plugins-functions:2.2
kg.apc:jmeter-plugins-dummy:0.4
io.github.vdaburon:pacing-jmeter-plugin:1.0
false
${jvm_xms}
${jvm_xmx}
-Duser.language=en
-Duser.area=EN
${prefix_script_name}.jmx
/
${venture.construct.listing}/jmeter/outcomes/
${basedir}/src/take a look at/jmeter/${config_properties_name}
${venture.construct.listing}/jmeter/outcomes
false
false
csv
Launching a Load Check on the JPetstore Internet Software
To launch a efficiency take a look at on the JPetstore software at 50% load for a period of 10 minutes, specify:
- The JMeter script prefix with
-Dprefix_script_name=jpetstore(for the jpetstore.jmx file) - The properties file title with
-Dconfig_properties_name=config_test_50pct_10min.properties, which comprises the digital customers’ configuration wanted for the 50% load and a 10-minute period) - The properties file (e.g., config_test_50pct_10min.properties), ought to comprise exterior configuration, together with JMeter properties such because the take a look at URL, the variety of digital customers per state of affairs, and the period of the take a look at.
To launch the load take a look at, use the next command:mvn -Dprefix_script_name=jpetstore -Dconfig_properties_name=config_test_50pct_10min.properties -f pom_01_launch_test.xml clear confirm
Notes to bear in mind:
- Make sure that the
mvnprogram is included within the PATH atmosphere variable or that theMAVEN_HOMEatmosphere variable is about. - Since Maven depends on a JDK/JRE, make certain the trail to the
javaprogram is specified within the launch file, or that theJAVA_HOMEatmosphere variable is configured. - If it’s essential cease the take a look at earlier than it reaches its scheduled time, run the shell script positioned at
(for Linux) or/bin/shutdown.sh shutdown.cmd(for Home windows).Â
The take a look at has began. The “Abstract logs” present an summary of the efficiency take a look at’s progress. We particularly keep watch over the time elapsed because the launch and the variety of errors encountered. This is an instance of the logs from a take a look at that was launched within the IntelliJ IDE:
C:Javajdk1.8.0_191binjava.exe ... -Dmaven.house=C:softwaremaven3 -Dprefix_script_name=jpetstore -Dconfig_properties_name=config_test_50pct_10min.properties -f pom_01_launch_test.xml clear confirm -f pom_01_launch_test.xml
[INFO] Scanning for initiatives...
[INFO] [INFO] --< io.github.vdaburon:jpetstore-maven-load-test-dzone >---
[INFO] Constructing 01 - Launch a load take a look at of the JPetstore internet software with the maven plugin 1.0
[INFO] from pom_01_launch_test.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] [INFO] --- clear:3.2.0:clear (default-clean) @ jpetstore-maven-load-test-dzone ---
[INFO] [INFO] --- jmeter:3.6.1:configure (configuration) @ jpetstore-maven-load-test-dzone ---
[INFO] [INFO] -------------------------------------------------------
[INFO] C O N F I G U R I N G J M E T E R
[INFO] -------------------------------------------------------
[INFO] [INFO] Creating take a look at configuration for execution ID: configuration
[INFO] Constructing JMeter listing construction...
[INFO] Producing JSON Check config...
[INFO] Configuring JMeter artifacts...
[INFO] Populating JMeter listing...
[INFO] Copying extensions to C:demojpetstore_loadtesting_dzonetarget1515b131-17ff-4f97-bcb7-ba2eec698862jmeterlibext Downloading dependencies: false
[INFO] Copying junit libraries to C:demojpetstore_loadtesting_dzonetarget1515b131-17ff-4f97-bcb7-ba2eec698862jmeterlibjunit Downloading dependencies: true
[INFO] Copying take a look at plan libraries to C:demojpetstore_loadtesting_dzonetarget1515b131-17ff-4f97-bcb7-ba2eec698862jmeterlib Downloading dependencies: true
[INFO] Configuring JMeter properties...
[INFO] [INFO] --- jmeter:3.6.1:jmeter (jmeter-tests) @ jpetstore-maven-load-test-dzone ---
[INFO] [INFO] -------------------------------------------------------
[INFO] P E R F O R M A N C E T E S T S
[INFO] -------------------------------------------------------
[INFO] [INFO] Executing take a look at: jpetstore.jmx
[INFO] Arguments for forked JMeter JVM: [java, -Xms256M, -Xmx756M, -Duser.language=en, -Duser.region=EN, -Djava.awt.headless=true, -jar, ApacheJMeter-5.6.3.jar, -d, C:demojpetstore_loadtesting_dzonetarget1515b131-17ff-4f97-bcb7-ba2eec698862jmeter, -j, C:demojpetstore_loadtesting_dzonetargetjmeterresultsjpetstore.jmx.log, -l, C:demojpetstore_loadtesting_dzonetargetjmeterresultsjpetstore.csv, -n, -q, C:demojpetstore_loadtesting_dzonesrctestjmeterconfig_test_50pct_10min.properties, -t, C:demojpetstore_loadtesting_dzonetargetjmetertestFilesjpetstore.jmx, -Dsun.net.http.allowRestrictedHeaders, true]
[INFO] [INFO] WARN StatusConsoleListener Using bundle scanning to find plugins is deprecated and shall be eliminated in a future launch
[INFO] WARN StatusConsoleListener Using bundle scanning to find plugins is deprecated and shall be eliminated in a future launch
[INFO] WARN StatusConsoleListener Using bundle scanning to find plugins is deprecated and shall be eliminated in a future launch
[INFO] WARN StatusConsoleListener Using bundle scanning to find plugins is deprecated and shall be eliminated in a future launch
[INFO] Creating summariser
[INFO] Created the tree efficiently utilizing C:demojpetstore_loadtesting_dzonetargetjmetertestFilesjpetstore.jmx
[INFO] Beginning standalone take a look at @ September 24, 2025 11:30:22 AM CEST (1758706222410)
[INFO] Ready for potential Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
[INFO] abstract + 33 in 00:00:08 = 4.2/s Avg: 100 Min: 30 Max: 1089 Err: 0 (0.00%) Lively: 2 Began: 2 Completed: 0
[INFO] abstract + 67 in 00:00:29 = 2.3/s Avg: 53 Min: 28 Max: 174 Err: 0 (0.00%) Lively: 5 Began: 5 Completed: 0
[INFO] abstract = 100 in 00:00:37 = 2.7/s Avg: 69 Min: 28 Max: 1089 Err: 0 (0.00%)
[INFO] abstract + 81 in 00:00:30 = 2.7/s Avg: 69 Min: 27 Max: 858 Err: 0 (0.00%) Lively: 7 Began: 7 Completed: 0
[INFO] abstract = 181 in 00:01:07 = 2.7/s Avg: 69 Min: 27 Max: 1089 Err: 0 (0.00%)
…
[INFO] abstract + 47 in 00:00:31 = 1.5/s Avg: 86 Min: 30 Max: 471 Err: 0 (0.00%) Lively: 7 Began: 7 Completed: 0
[INFO] abstract = 1381 in 00:09:38 = 2.4/s Avg: 71 Min: 27 Max: 1184 Err: 0 (0.00%)
[INFO] abstract + 36 in 00:00:22 = 1.6/s Avg: 69 Min: 30 Max: 150 Err: 0 (0.00%) Lively: 0 Began: 7 Completed: 7
[INFO] abstract = 1417 in 00:10:00 = 2.4/s Avg: 71 Min: 27 Max: 1184 Err: 0 (0.00%)
[INFO] Tidying up ... @ September 24, 2025 11:40:23 AM CEST (1758706823339)
[INFO] ... finish of run
[INFO] Accomplished Check: C:demojpetstore_loadtesting_dzonetargetjmetertestFilesjpetstore.jmx
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Whole time: 10:08 min
[INFO] Completed at: 2025-09-24T11:40:24+02:00
[INFO] ------------------------------------------------------------------------
[INFO] Shutdown detected, destroying JMeter course of...
[INFO] Â Course of completed with exit code 0
The outcomes could be discovered within the following listing:
- jpetstore.jmx.log (JMeter logs)
- error.xml (comprises details about failed samplers)
- jpetstore.csv (JMeter outcomes)
Evaluation of Outcomes
We use the second Maven POM file particularly for evaluation functions, which is known as: pom_02_analyse_results.xml
The launch parameter is: prefix_script_name, representing the script prefix with out its extension. That is vital as a result of the JMeter outcomes file follows the format
To launch the evaluation, sort the next command:mvn -Dprefix_script_name=jpetstore -f pom_02_analyse_results.xml confirm
Word: DO NOT use the clear command as it is going to erase the take a look at outcomes that we need to retain.
The Maven File With the Plugin and Instruments for Evaluation
The Maven plugin and instruments:
- jmeter-graph-tool-maven-plugin
- csv-report-to-html
- create-html-for-files-in-directory
The jmeter-graph-tool-maven-plugin plugin means that you can:
- Filter JMeter outcomes recordsdata by retaining solely the pages whereas eradicating the web page URLs. It may additionally slender down the information by take a look at interval, guaranteeing that solely the steps with a steady variety of digital customers are included.
- Generate a “Abstract” report in CSV format
- Generate a “Synthesis” report in CSV format
- Create graphs in PNG format to visible numerous metrics, together with:
- Threads State Over Time
- Response Codes Per Second
- Bytes Throughput Over Time
- Transactions Per Second
- Response Occasions Percentiles
- Response Occasions Over Time
The csv-report-to-html instrument reads the generated CSV experiences (each Abstract and Synthesis) and generates an HTML desk displaying the information contained inside.
In the meantime, the create-html-for-files-in-directory instrument browses the goal/jmeter/outcomes listing and creates an index.html web page. This web page serves as a handy hub for viewing numerous picture recordsdata, HTML tables, and create hyperlinks to different recordsdata current within the listing.
The pom_02_analyse_results.xml File for Evaluation
The contents of the pom_02_analyse_results.xml file are outlined beneath:
4.0.0
io.github.vdaburon
jpetstore-maven-analyse-result-dzone
1.0
pom
02 - Analyzes the outcomes of the online software JPetstore load take a look at with deditated maven plugins
Analyzes the outcomes of the online software JPetstore load take a look at with deditated maven plugins
2025
vdaburon
Vincent DABURON
[email protected]
architect
developer
UTF-8
1.8
1.8
256
756
960
800
jpetstore
io.github.vdaburon
csv-report-to-html
1.2
io.github.vdaburon
create-html-for-files-in-directory
1.9
io.github.vdaburon
jmeter-graph-tool-maven-plugin
1.2
create-graphs
create-graph
confirm
${venture.construct.listing}/jmeter/testFiles
${venture.construct.listing}/jmeter/outcomes/${prefix_script_name}.csv
${venture.construct.listing}/jmeter/outcomes/${prefix_script_name}_filtred.csv
false
SC[0-9]+_P.*
true
AggregateReport
${venture.construct.listing}/jmeter/outcomes/${prefix_script_name}.csv
${venture.construct.listing}/jmeter/outcomes/G01_AggregateReport.csv
SC[0-9]+_.*
true
SynthesisReport
${venture.construct.listing}/jmeter/outcomes/${prefix_script_name}.csv
${venture.construct.listing}/jmeter/outcomes/G02_SynthesisReport.csv
SC[0-9]+_.*
true
ThreadsStateOverTime
${venture.construct.listing}/jmeter/outcomes/${prefix_script_name}.csv
${graph_width}
${graph_height}
${venture.construct.listing}/jmeter/outcomes/G03_ThreadsStateOverTime.png
no
no
no
ResponseCodesPerSecond
${venture.construct.listing}/jmeter/outcomes/${prefix_script_name}.csv
${graph_width}
${graph_height}
${venture.construct.listing}/jmeter/outcomes/G05_ResponseCodesPerSecond.png
no
no
100
no
SC[0-9]+_.*
true
TransactionsPerSecond
${venture.construct.listing}/jmeter/outcomes/${prefix_script_name}_filtred.csv
${graph_width}
${graph_height}
${venture.construct.listing}/jmeter/outcomes/G07_TransactionsPerSecondAggregated.png
no
sure
no
100
no
ResponseTimesPercentiles
${venture.construct.listing}/jmeter/outcomes/${prefix_script_name}_filtred.csv
${graph_width}
${graph_height}
${venture.construct.listing}/jmeter/outcomes/G08_ResponseTimesPercentiles.png
no
no
ResponseTimesOverTime
${venture.construct.listing}/jmeter/outcomes/${prefix_script_name}_filtred.csv
${graph_width}
${graph_height}
${venture.construct.listing}/jmeter/outcomes/G11_ResponseTimesOverTime_SC01.png
no
no
100
SC01.*
true
2000
${jvm_xms}
${jvm_xmx}
-Duser.language=en
-Duser.area=EN
-Djmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS
-Djmeter.save.saveservice.default_delimiter=;
org.codehaus.mojo
exec-maven-plugin
1.2.1
aggregate_csv_to_html
confirm
java
io.github.vdaburon.jmeter.utils.ReportCsv2Html
${venture.construct.listing}/jmeter/outcomes/G01_AggregateReport.csv
${venture.construct.listing}/jmeter/outcomes/G01_AggregateReportSorted.html
kind
synthesis_csv_to_html
confirm
java
io.github.vdaburon.jmeter.utils.ReportCsv2Html
${venture.construct.listing}/jmeter/outcomes/G02_SynthesisReport.csv
${venture.construct.listing}/jmeter/outcomes/G02_SynthesisReportSorted.html
kind
create_html_page_for_files_in_directory
confirm
java
io.github.vdaburon.jmeter.utils.HtmlGraphVisualizationGenerator
${venture.construct.listing}/jmeter/outcomes
index.html
image_width
${graph_width}
add_toc
true
Within the outcomes listing, you may discover the graphs, CSV recordsdata containing experiences, and HTML tables for the experiences. There’s additionally an index.html web page, which lets you view the outcomes and offers hyperlinks to the completely different recordsdata. This listing could be discovered at goal/jmeter/outcomes inside your Maven venture.
The generated index.html web page means that you can view the graphs and entry file hyperlinks instantly in your internet browser. This is a glimpse of what the HTML web page shows:
The JMeter log file could be discovered within the listing: goal/jmeter/outcomes . This isn’t the default location; the pom.xml file, particularly pom_01_launch_test.xml , has been modified to specify the file location log:. Consequently, the created log file is known as with a prefixed that mixes the script file title and the “.log” extension, for instance, jpetstore.jmx.log.
Limitations of the Load Testing Answer With Maven
The constraints encountered do not come instantly from Maven itself, however quite from the pc (whether or not it is a VM or a POD) that’s operating the load take a look at. When coping with heavy masses, it is usually vital to switch system settings to extend the boundaries of the account that runs Apache JMeter. In Linux, the boundaries could be discovered within the within the file positioned at /and so forth/safety/limits.conf. The default values are usually inadequate for high-load testing eventualities.
To examine the present limits for a Linux account, you may run the command:ulimit -a
By default, the utmost variety of open recordsdata and community connections is capped at 1024. Moreover, the variety of processes is proscribed to 4096. To switch these limits, you may must edit the /and so forth/safety/limits.conf file as a root person. Make certain to vary the values for the Linux person (on this case, JMeter) that’s operating Java, to accommodate the required instructions.
jmeter laborious nproc 16384
jmeter smooth nproc 16384
jmeter laborious nofile 16384
jmeter       smooth   nofile   16384
When a take a look at is launched by a GitLab Runner (or a Jenkins node), it is important for the Runner to have system settings adjusted to accommodate CPU load, obtainable reminiscence, and community bandwidth.
Going Additional
Further Steps
To handle the scale of the JMeter outcomes and the XML error recordsdata, think about including a compression step, as these recordsdata are typically fairly giant and compress effectively. There are two obtainable plugins that may assist validate the outcomes towards Key Efficiency Indicators (KPIs):
Aditionally, you may broaden your evaluation to incorporate the era of KPI outcomes, permitting your Steady Integration pipeline to fail if any KPIs fall brief. In it’s essential generate a PDF doc from the index.hml web page, instruments like convert-html-to-pdf (https://github.com/vdaburon/convert-html-to-pdf) can assist you accomplish that.
Monitoring
You will need to monitor the atmosphere being examined throughout load checks. You may incorporate extra steps to start out monitoring earlier than the take a look at begins and to cease it after the load take a look at is full. This manner, you may retrieve the recordsdata generated through the monitoring section for additional evaluation.
It is strongly recommended to make use of Software Efficiency Monitoring instruments (akin to Dynatrace or ELASTIC APM) to look at each the applying and the atmosphere all through the load take a look at.







