Software Testing-Performance T
Software Testing-Performance T
Testing-Jmeter
LIU Weihong
School of computer science and technology
Anhui university of technology
[email protected]
Outlines
• What is performance testing?
• How to build the test environment?
• How to do the performance testing?
Performance testing
• Monitor the performance of system when
lots of users operate the system at the
same time
• Use some tools to simulate users.
Build test environments
Step1:
1. download Jmeter from
http://jmeter.apache.org/download_jmeter.
cgi
2. unzip Jmeter(the Jmeter you download
will be a zip file) to disk C.
PS: JDK needs to be installed before step 2.
How to do the performance testing?
Basic process:
(1) start Jmeter(by double clicking on
ApacheJMeter.jar),
(2) Add a Thread Group
(3) Add a HTTP Request
(4) enter “Server Name or IP”, Path and
Parameters
(5) Set the number of users
(6)Add-Listener-Aggregate Report and View
Results Tree
(7)start to test.
Add a Thread Group
Add a HTTP Request
enter “Server Name or IP”,
Path and Parameters
How to set the number of users?
Note: setting the ramp up period (in seconds) in the thread group to
10 means that there are 10 users in 10 seconds. If the number of
virtual users is set to 10, there will be one user in one second.
How to Add-Listener-Aggregate Report?
# Samples: Indicates how many requests you made in
this test. If the test plan simulates 10 users and each
user iterates 10 times, 100 will be displayed here.
Average: Average response time - by default, the
average response time for a single Request. When a
transaction controller is used, the average response
time can also be displayed in transaction units.
Min: minimum response time
Max: maximum response time
Error%: error rate, total number of erroneous requests
in the test / total number of requests.
Throughput: Throughput -- By default, the number of
requests per second completed
KB/Sec: the amount of data received from the server
per second.
How to set parameters?(the first way)
How to set parameters? (the
second way)
How to use the parameter
values?
Use the parameter value : ${variable name}