0% found this document useful (0 votes)
14 views21 pages

Software Testing-Performance T

Uploaded by

Tridip Barua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views21 pages

Software Testing-Performance T

Uploaded by

Tridip Barua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Performance

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}

We can check if the parameter values are


correct in the request data of View Results
Tree
example1
example2
Insert Sysnchronizing Timer
• Steps :
step 1: Right click on the request you need
step 2: Add-Timer-Synchronizing Timer
If the “Number of Simulated Users to
Group by” is set to 10, this means that
after all the 10 users get ready, the
request is sent at the same time. This is
used to simulate the real concurrency as
much as possible)
Insert Transaction Controller
Description for inserting
transaction
• JMeter automatically counts each request
as a transaction, but sometimes we want
to count multiple operations as one
transaction and use transaction controller.
• Select the requests to be merged, right-
click on them: Insert parent -- logic
controller -- transaction controller. And
select generate parent sample. The
monitoring data of the sub requests will
not be displayed.
Result analysis
• Examples:
• ( 1 ) 50 users simultaneously visit the scheduled
pages of enterprise user conference room, with an
average response time of 0.146 seconds, the maximum
response time of 0.387 seconds, the minimum response
time of 0.096 seconds and error rate of 0.
• (2) 100 users simultaneously visit the scheduled
pages of enterprise user conference room. The average
response time is 2.295 seconds, the maximum response
time is 8.132 seconds, the minimum response time is
0.425 seconds, and the error rate is 0.

You might also like