3. AGENDA
-Performance Testing and Objectives
-Initial steps before starting the Project.
-Examples of Client Requests and
scenarios.
-Jmeter Installation
-A Basic Jmeter Test
4. Performance Testing
In software engineering, performance testing is in general testing
performed to determine how a system performs in terms of responsiveness
and stability under a particular workload. It can also serve to investigate,
measure, validate or verify other quality attributes of the system, such as
scalability, reliability and resource usage.
Goal is to find Bottlenecks and improve the
User Experience
5. Testing types
Load testing: A type of performance testing conducted to evaluate the
behavior of a component or system with increasing load, e.g. numbers of
parallel users and/or numbers of transactions, to determine what load can be
handled by the component or system
Stress testing: A type of performance testing conducted to evaluate a
system or component at or beyond the limits of its anticipated or specified
workloads, or with reduced availability of resources such as access to
memory or servers
Spike Testing: Spike testing is done by suddenly increasing the number of or
load generated by users - by a very large amount - and observing the
behaviour of the system. The goal is to determine whether performance will
suffer, the system will fail, or it will be able to handle dramatic changes in
load.
6. Volume Testing: Testing where the system is subjected to large
volumes of data
Soak testing: Soak testing, also known as endurance testing, is usually done to
determine if the system can sustain the continuous expected load. During soak
tests, memory utilization is monitored to detect potential leaks. Also important, but
often overlooked is performance degradation. That is, to ensure that the
throughput and/or response times after some long period of sustained activity are
as good or better than at the beginning of the test. It essentially involves applying
a significant load to a system for an extended, significant period of time. The goal
is to discover how the system behaves under sustained use.
Testing types
7. Performance Goals:
->It can demonstrate that the system meets performance criteria.
-->It can compare two systems to find which performs better.
→ It can measure what parts of the system or workload causes the system to perform badly.
Performance Goals and Important terms
Concurrency/throughput
If a system identifies end-users by some form of log-in procedure then a concurrency goal
is highly desirable. By definition this is the largest number of concurrent system users that
the system is expected to support at any given moment. The work-flow of a scripted
transaction may impact true concurrency especially if the iterative part contains the log-in
and log-out activity.
If the system has no concept of end-users then performance goal is likely to be based on a
maximum throughput or transaction rate. A common example would be casual browsing of
a web site such as Wikipedia.
Server response time
This refers to the time taken for one system node to respond to the request of another. A
simple example would be a HTTP 'GET' request from browser client to web server. In terms
of response time this is what all load testing tools actually measure. It may be relevant to
set server response time goals between all nodes of the system.
8. Many performance tests are undertaken without due consideration to the setting of
realistic performance goals. The first question from a business perspective should
always be "why are we performance testing?". These considerations are part of
the business case of the testing
Performance Objectives
→ Reliability: To know how reliable the application is.
→ Determine if the application complies with contracts, regulations, and service level
agreements (SLAs).
→ Detect bottlenecks to be tuned.
→ Assist the development team in determining the performance characteristics for various
configuration options.
→ Provide input data for scalability and capacity-planning efforts.
→ Determine if the application is ready for deployment to production.
→ Review the architecture
→ Review the Test Plan
→ Ask Team Members
9. Questions to ask:
What is our anticipated average number of users (normal load) ?
What is our anticipated peak number of users ?
When is a good time to load-test our application (i.e. off-hours or week-ends), bearing in
mind that this may very well crash one or more of our servers ?
Does our application have state ? If so, how does our application manage it (cookies,
session-rewriting, or some other method) ?
What is the testing intended to achieve?
Initial steps before starting the Project.
Understanding the application is a must. Understanding the Business Scenarios
can really help clear up the mind and aligning with what needs to be done and
how this can be achieved
11. About Jmeter
The Apache JMeter™ desktop application is open source software, a 100%
pure Java application designed to load test functional behavior and measure
performance. It was originally designed for testing Web Applications but has
since expanded to other test functions.
Apache JMeter features include:
Ability to load and performance test many different server/protocol types:
Web - HTTP, HTTPS
SOAP
FTP
Database via JDBC
LDAP
Message-oriented middleware (MOM) via JMS
Mail - SMTP(S), POP3(S) and IMAP(S)
MongoDB (NoSQL)
Native commands or shell scripts
TCP
Complete portability and 100% Java purity .
Full multithreading framework allows concurrent sampling by many threads and
simultaneous sampling of different functions by separate thread groups.
Careful GUI design allows faster Test Plan building and debugging.
12. Jmeter Installation
→ Jmeter is a Java application, so a JRE or SDK first needs to be installed
→ Go to http://jmeter.apache.org/download_jmeter.cgi
→ Download Jmeter, and install by unzipping the .zip or .tgz file in any
directory.
→ Go to jakarta-jmeter Directory (Directory in which the .zip of .tgz file is
unzipped)
→ Type ./bin/jmeter on command prompt(for Unix) or Run bin/jmeter.bat (for
Windows)
→ JMeter is ready to test application.
14. Jmeter Basic test
→ Add Thread Group element
→ Define Number of Users and Ramp up Time
→ Adding Cookie Support
→ Adding Samplers
→ Adding Listeners
16. → Set up proxy in Browser
→ Add Test Script Recorder from in workbench
from Non Test Elements
→ Select Recording Controller/HTTP Test Script
Recorder/Test Plan on Test Script Recorder
Window to tell Jmeter where to Capture results
→ Click Start
→ Perform Action on Application under Test and
see whether Actions are being captured