Beruflich Dokumente
Kultur Dokumente
Questionnaire?
1.What are the important resources to be considered before
conducting a load test?
2.What is the peak load a machine can with stand?
3.Why should we distribute load ?
4.What is Soak test?
5.What is a Web-Service?
6.List some Statistical Metrics.
Agenda
• Load-Distribution
• Purpose
• Pre-requisites
• Process
• Adding a Plug-in
• Protocols in Jmeter
• JDBC
• SOAP
• LDAP
• Listeners
• Results and Analysis
Load Distribution:
Purpose:
Load Distribution is the process of controlling load
generator machines centrally .It generates load in more
realistic manner and also give back accurate test results.
Pre-requisites:
For load distribution
• Ensure that Jmeter installed in the systems is of same
version.
• The firewall on both “Master” and “Slave” systems
should be disabled.
Architecture
Process :
Slave Machine:
• Go to Jmeter > bin directory and run jmeter-server.bat
• Open jmeter-server.bat and search for “START rmiregistry”
Replace rmiregistry with C:\j2sdk1.4.2\jre\bin\rmiregistry.
Master Machine:
• Open Jmeter>bin>jmeter.properties file.
• Replace “remote hosts=127.0.0.1” with the IP address of
slave machine.
(For eg:172.26.3.213,172.26.2.144).
Adding plug-in
Plug-ins incorporate the feature of extensibility in the tool. To
Enhance the functionality of the tool, add the readily available
.jar files to D:\Jmeter\lib or D:\Jmeter\lib\ext as per the
requirement.
Customization:
Download Jmeter’s source version to get the source code.
Required tool customization can be done by this.
Protocols
Pre-requisites:
• To use MySQL driver, its .jar file should be copied to
the JMeter lib directory.
• Create a database and insert data into tables.
JDBC
Process:
JDBC Sampler
1) Create a basic test plan to test a database server.
2) Add users to the thread group.
3) Right click on Thread Group>Add>Sampler>JDBC Request.
4) Right click on Thread group>Add>Configuration Element> JDBC
Connection Configuration.
Click on JDBC Request and give the variable name as ‘MySQL’
Select a query type
Enter the appropriate Query in the Query Field. For Example Enter ‘Select
* from table name’.
JDBC
Connection Configuration:
Click on JDBC Connection Configuration and give the following
details
Variable name : MySQL (this is the same name given in
the variable name of JDBC Request).
Database URL : [jdbc]:[database type]://[hostname:
port]/[database name]i.e.
jdbc:mysql://127.0.0.1:8080/application.
JDBC Driver class: com.mysql.jdbc.Driver
Username: root ( Default user name of MySql)
Password: mysql (Default password of MySql)
Simple JDBC Result
Web-Service
What is a Web Service?
• Web Service is a software system designed to support
interoperable Machine to Machine interaction over a
Network.
• It is based on already existing and well-known HTTP
protocol.
• It refers to clients and servers that communicate using
XML messages that follow the SOAP standard.
Web-Service(SOAP)Request
Pre-Requisites:
Types of listeners:
• Graph Results
• View Results Tree
• View Results in a Table
• Summary Report
• Aggregate Graph
• Aggregate Report
Graph Results listener:
It includes:
• Data - plot the actual data values
• Average - plot the Average
• Median - plot the Median (midway value)
• Deviation - plot the Standard Deviation
• Throughput - plot the number of samples per unit of time
Graph Results
View Results Tree:
It is a tree of all sample responses, the time a sample took to
get this response and some response codes.
Request panel only shows the headers added by Jmeter.
Summary Report:
The summary report creates a table row for each differently
named request in your test. This is similar to the Aggregate
Graph, except that it uses less memory.
View Results Tree:
View Results In a Table:
Summary Report:
Aggregate report :
Creates a table row for each differently named request in the
test. For each request, it totals the response information and
provides request count, min, max, average, error rate,
approximate throughput (request/second) and Kilobytes per
second throughput.
Aggregate graph :
Is similar to the aggregate report and provides an easy way to
generate bar graphs and save the graph.
Aggregate Report
Aggregate Graph
Results and Analysis
Factors involved:
• Throughput
• Response Time
• Latency
• Tuning
• Benchmarking
• Capacity Planning
Throughput:
It determines the capability of a system or product in
handling multiple transactions.
i.e Number of Requests or Business transactions processed
per unit time.
Response Time:
Is defined as the time elapsed between the point of Request
and the first Response from the product.
Note:- Not all the delay that happens between the Request
-Response Round-Trip is caused by the product.
Latency:
Is the delay caused by the application ,Operating system and
by the environment that are calculated separately.
N1 A1 N2
Data
Base
clien Web
Inte A2
t Serve
rnet Server
r
N4 N3
A3
This involves
• Calculating the mean of test result data
• Calculating the standard deviation
• 90% line
• Differentiating the performance data when the resources are
available completely as against when some background
activities were going on.
Mean:
Sum of the samples divided by the number of samples.
Performance numbers are to be reproducible . To ensure this,
all performance tests are repeated multiple times and the
average or mean is taken.