Comprehensive JMeter Performance Testing Tutorial: Installation, Script Creation, Execution, and Report Analysis
This guide provides a step‑by‑step tutorial on using Apache JMeter for performance testing, covering JDK and JMeter installation, creating a complete test script for a Baidu search API, configuring thread groups, HTTP requests, listeners, assertions, executing the test, and analyzing the aggregate report results.
Apache JMeter is a pure‑Java open‑source tool for load and performance testing. Compared with LoadRunner, JMeter is lightweight, free, and has become a mainstream choice for testers.
JDK Installation : Since JMeter runs on Java, download and install JDK 8 from the official Oracle site (
http://www.oracle.com/technetwork/java/javase/downloads/index.html), then configure the system environment variables.
JMeter Installation : Download the latest JMeter 3.3 zip from http://jmeter.apache.org/download_jmeter.cgi, unzip it, and start JMeter by executing apache-jmeter-3.3\bin\jmeter.bat.
Test Example : The tutorial uses the Baidu search interface http://www.baidu.com/s?ie=utf-8&wd=jmeter性能测试 as the target API, with request parameters ie=utf-8 and wd (search keyword).
Script Creation :
Add a Thread Group (configure name, number of threads, ramp‑up period, loop count, scheduler, etc.).
Add an HTTP Request sampler pointing to the Baidu URL, set method to GET, and use the variable ${wd} for the search term.
Add a View Results Tree listener to inspect responses.
Add a User Defined Variables element to define wd (e.g., jmeter).
Add a Response Assertion to verify that the response contains the search keyword ${wd}.
Add an Assertion Result listener to see assertion outcomes.
Add an Aggregate Report listener to collect performance metrics.
Test Execution : Configure the thread group (e.g., 10 concurrent users, 60 seconds duration) and start the test by clicking the green run button, clearing previous results with the broom icon if needed.
Report Analysis : After the test finishes, open the Aggregate Report to view metrics such as #Samples, Average, Median, 90% Line, Min, Max, Error %, Throughput, and KB/sec. Focus on request count, average response time, min/max times, error rate, and throughput.
Source Download : The complete JMeter script can be downloaded from the provided Baidu Cloud link ( https://pan.baidu.com/s/1eS90cVo, password: st15).
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Architect's Tech Stack
Java backend, microservices, distributed systems, containerized programming, and more.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
