Professional Documents
Culture Documents
Load With JMeter PDF
Load With JMeter PDF
Index
1. Jmeter Features and Overview
2. Comparing Jmeter with other Performance Testing Tools
3. Introduction about IMSSPL site
4. Test Environment
5. Types of Testing
6. Functional Testing Approach
7. Load Testing Approach
8. Stress Testing Approach
9. Stability Testing Approach
10.Testing on virtual client/server environment
11. Comparing the results of Normal and Virtual environment
Excellent cost saving solution for small projects as it is an open source tool.
Robust in handling complex test scenarios that demand n number of virtual
users.
Complete portability and supports 100% all the Java based applications.
Less scripting efforts as compared to other tools because of its user effective GUI.
Is used to conduct Functionality, Load, Stress, Volume & Endurance tests on the
Web & Web-service based applications.
HTTP load testing can be done without any adding additional plugging samplers.
Since it is Java based, the tool was highly compatible with most of the Java based
requests i.e. it can be used to directly test the Java requests, JDBC requests and
JMS publisher & Subscriber. Hence it is a very good cost effective solution for
small development activities as well.
Item
Unlimited Load generation
Supports IP spoofing
Large download performance
Server monitoring
Batch Mode
Ease - Installation
Ease Script Authoring
Ease Running Tests
Results Reporting
Agent Management
Cross Platform
Cost
Technical Level
Stability/Bugginess
Transaction power
Custom protocols
Scalability of Agent
Slow sockets
External libs usable
Load Scheduling
Scalability of Controller
Real-time test monitoring
Real-time load adjustment
Script management
Script Development Environment
Load Runner
NO
Yes
Yes
Yes
NO
NO
Yes
neutral
Yes
Yes
NO
NO
Yes
neutral
Yes
Yes
Yes
Yes
Yes
Yes
neutral
Yes
Yes
Yes
Yes
JMeter
Yes
NO
NO
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
NO
neutral
Yes
neutral
neutral
Yes
Yes
NO
Yes
NO
Yes
NO
The Grinder
Yes
Yes
neutral
Yes
Yes
Yes
Yes
neutral
NO
NO
Yes
+
NO
neutral
Yes
Yes
neutral
NO
Yes
NO
+
neutral
NO
NO
NO
We find Jmeter is appropriate for testing our web-site because its free, its ease
of Installing/Recording and Reporting. We can increase loads till application's tolerance
point. We can use it on linux/windows environment etc...
Installation Requirements:
JMeter requires a fully compliant JVM 1.5 or higher because JMeter uses only
standard Java APIs, please do not file bug reports if JRE fails to run JMeter
because of JRE implementation issues.
Operating System : JMeter is a 100% Java application and should run correctly
on any system that has a compliant Java implementation. JMeter has been tested
and works under:
Unix (Solaris, Linux, etc)
Windows (98, NT, XP, etc)
OpenVMS Alpha 7.3+
Installation:
The most recent release of Jmeter, we can download from JMeter's site.
Downloads area available as either .gz or .zip file. To install a release build, simply
unzip the zip/tar file into the directory where we want JMeter to be installed. Provided
that we have a JRE/JDK correctly installed and the JAVA_HOME environment variable
set.
Running Jmeter:
To run JMeter, run the jmeter.bat (for Windows) or jmeter (for Unix) file. These files are
found in the bin directory. After a short pause, the JMeter GUI should appear. The user
interface has two panes.
The left pane displays the elements used in testing. Initially, there are two subelements, Test Plan and WorkBench. Add an element to a node by right-clicking on
Test Plan and selecting Add. To remove an element, select the element by clicking
on it, then right-click on the element and choose the Remove option.
The right pane of the user interface displays the details of each element. We are now
ready to use Jmeter.
**Note
We should not run JMeter on the same machine running the application to be tested.
JMeter may use extensive resources that might affect the other application's performance
if they are both run on the same machine.
Testing
Load Testing
Stress Testing
Stability Testing
Basic necessity to check this website is whether the server of the site is rendering its
services properly to the general group of users or not. To fulfill this criteria, above
mentioned testing is required.
Stress Testing is done by identifying out the Break point by incresing the
Number of Users accessing the same Key element in that particular website
for how much duration and at what intensity.
Stress testing will determine the performance of the particular site and check
the strength of Non-Functionality of the particular Website.
Under Stress Testing the Number of Thread Groups or Users need to be
increased gradually and check where the Break point is and when the system
would start behaving unexceptionally and cannot withstand the load with the
particular resources available.
Stability testing:
Load Testing:
Load Testing is done to check how the system behaves under certain load
condition.
How the system is expected to behave under certain circumstances like : Provide
the system with certain Input and the Desired Output is achieved or not ,as
compared to the load condition.
Under Load Testing the number of Thread Groups or Users accessing the system
or particular Key element in that Website may be 500 or 600,compared as per the
intensity of the users using that website and as per the publicity of the Website.
Functional Testing
JMeter is found to be very useful and convenient in support of functional
testing. Although functional testing elements can be integrated within the Test Plan,
which was originally designed to support load testing. Many other load-testing tools
provide little or none of this feature, restricting themselves to performance-testing
purposes. Besides integrating functional-testing elements along with load-testing
elements in the Test Plan, we can also create a Test Plan that runs these exclusively. In
other words, aside from creating a Load Test Plan, JMeter also allows us to create a
Functional Test Plan. This flexibility is certainly resource-efficient for the testing
project.
JMeter does not have a built-in browser, unlike many functional-test tools. It
tests on the protocol layer, not the client layer (i.e. JavaScripts, applets, and many more.)
and it does not render the page for viewing. Although, by default that embedded
resources can be downloaded, rendering these in the Listener | View Results Tree may
not yield a 100% browser-like rendering. In fact, it may not be able to render large
HTML files at all. This makes it difficult to test the GUI of an application under testing.
However, to compensate for these shortcomings, JMeter allows the tester to
create assertions based on the tags and text of the page as the HTML file is received by
the client. With some knowledge of HTML tags, we can test and verify any elements as
we would expect them in the browser.
It is unnecessary to select a specific workload time to perform a functional
test. In fact, the application we want to test may even reside locally, with our own
machine acting as the "localhost" server for our web application. For this article, we will
limit ourselves to selected functional aspects of the page that we seek to verify or assert.
Performance Testing
Performance testing of an application / system is basically the process of
understanding how the application and its operating environment behave at various user
loads. In general, it is performed by simulating virtual users to determine / validate the
scalability, availability, robustness, hardware & software resource utilization of the
application thus ideally paving the way for effective capacity planning of the system for
future usage.
One of the main objectives of performance testing is to help maintain the system with
low latency, high throughput, and low utilization.
Poor Response Time: A critical web page may take one minute to show up. The
expected response time is less than 10 seconds.
Scalability: When 100 users from new branch were introduced into the system,
the application was unable to handle the additional load and response times
degraded from 5 seconds to 50 seconds.
Batch Window Issues: The batch upload that is supposed to happen in a 1AM to
7AM window does not complete till 9:30 AM. This impacts the availability of
data for online applications.
Availability: The application server needs to be restarted owing to resource leaks
within the application. This causes a downtime of at least 0.5 hours a day.
Resource Capacity Planning: An application consumes 90% CPU on a server
that is supposed to host another application after 3 months . There is no extra
capacity to take this additional load.
Identified Features:
We will create a Test Plan(imsspl Website) in order to demonstrate how we
can configure the Test Plan to include functional testing capabilities. The modified Test
Plan will include these scenarios:
1. Navigate to Home page
2. Navigate to About Us page and its options
3. Navigate to Competency page and its options
4. Navigate to Service Offerings page and its options
5. Navigate to Why Integra-Services page and its options
6. Navigate to Careers page and its options
7. Navigate to Resource Centre page and its options
8. Navigate to Contact page and its options
Data
Expected
It should display as
pass in Assertion Result
in Jmeter.
It should display as
pass in Assertion Result
in Jmeter.
It should display as
pass in Assertion Result
in Jmeter.
* Path :- /imsspl/index2.php?content=about_us
4.Add Response Assertion under Http Request
* Apply To : - Main Sample Only
* Response field to Check :- Text Response
* Pattern Matching Rules :- Contains
* Pattern To Test : - Click on Add button and Give Keyword About
Integra-Services
5.Add Assertion Result Listeners in thread group
6.Click on run option
7.Select Start Option
1.Open Jmeter
2.Add Thread group under test plan with single thread
3.Add Http Request under thread group
* Server IP :- 10.30.10.184
* Path :- /imsspl/index2.php?content=services
4.Add Response Assertion under Http Request
* Apply To : - Main Sample Only
* Response field to Check :- Text Response
* Pattern Matching Rules :- Contains
* Pattern To Test : - Click on Add button and Give Keyword
Service Offerings
5.Add Assertion Result Listeners in thread group
It should display as
pass in Assertion Result
in Jmeter.
It should display as
pass in Assertion Result
in Jmeter.
It should display as
pass in Assertion Result
in Jmeter.
As we use this default element, our subsequent recording never needs to append the
Server name. The result of our recording of the first page is shown in the following
snapshot:
Now,we may de-select the Capture HTTP Headers option in the Proxy Server
element, since we have the default header.
Or there is another process also to do these steps :1.Add thread groups as child of Test Plan as displaying in fig below.
2.Now change the name of each thread group as according to requirements as like
showing in figure given below.
On the other hand, a failed Assertion would show an error message in the same Listener
as the following snapshot illustrates.
Since a page error or Page not found error is a real risk in web applications, a failure
may originate from such an error, and not just because of a failed Assertion. We can
view more information about the sampler that contains the failed Assertion to investigate
the origins of a failure. A View Results Tree Listener records the details of requests and
logs all errors (indicated by the red warning sign and red fonts).
Summary
This will provide visual means for us to understand the capabilities of JMeter tools that
support functional testing, as we directly wrote and implemented a JMeter script. We
have demonstrated building a Test Plan to contain functional validations (or assertions)
by incorporating various essential JMeter components, particularly the 'Response
Assertion' element and 'Assertion Result' Listener. By using the 'User Defined Variable'
Configuration element, we have also parametrized several values in order to give our
Test Plan better flexibility. In addition, we have observed the result of these assertions as
we performed a 'live' run of the application under test. An HTTP Request sampler may
require to be modified, if there are any changes to the parameter(s) that the sampler
sends with each request.
Identify Requirements
Identify load-critical scenarios
Identify the target load levels
Implement test Design
Design specific tests
Run tests
Analyze the results
Load Testing:
Load Testing is done to check how the system behaves under certain load
condition.
How the system is expected to behave under certain circumstances like :
Provide the system with certain Input and the Desired Output is achieved or
not ,as compared to the load condition.
Under Load Testing the number of Thread Groups or Users accessing the
system or particular Key element in that Website may be 500 or 600,compared
as per the intensity of the users using that website and as per the publicity of
the Website.
Test Steps
Expected
500 users should be
able to access the
home page with in sec
average time
Now,we may de-select the Capture HTTP Headers option in the Proxy Server
element, since we have the default header.
Or there is another process to do this thing like:3.Add thread groups as child of Test Plan as displaying in fig below.
4.Now change the name of each thread group as according to requirements as like
showing in figure given below.
Summary Report :
The summary report creates a table row for each differently named request in your test.
This is similar to the Aggregate Report , except that it uses less memory.
The throughput is calculated from the point of view of the sampler target (e.g. the
remote server in the case of HTTP samples). JMeter takes into account the total time
over which the requests have been generated. If other samplers and timers are in the
same thread, these will increase the total time, and therefore reduce the throughput
value. So two identical samplers with different names will have half the throughput of
two samplers with the same name. It is important to choose the sampler labels correctly
to get the best results from the Report.
This Visualizer creates a row for every sample result. Like the View result Tree this
Listener uses a lot of memory space
Summary :
This will provide visual means for us to understand the capabilities of JMeter tools that
support Load testing, as we directly wrote and implemented a JMeter script. We have
demonstrated building a Test Plan to contain Load testing by incorporating various
essential JMeter components, particularly the 'Aggregate Graph' element and 'Summary
Report' Listener.
Key scenarios:
In first test case, there are ten threads, particular number of users will access
home page, and top menu options like About Us, Competency, Service
Offerings, Why Integra-Services, Careers, Resource Centre, Contact Us,
Home, Privacy Policy. In second and third test cases, we are navigating to the submenus and recording it.
Defining Workload:
Starting from 100 users, we are increasing user count by 200, 400, 800.. till No
response from server. All these virtual users are simultaneously accessing with the
functions given under key-scenarios.
Metrics to be collected:
Average Response Time and Throughput values will be collected after execution
Test
Description
Observation
Stress_01
Find how
many
concurrent
users can
perform given
functionalities.
1.Open Jmeter
2.Add 10 Thread groups under test plan
3. Do proxy setting and record the following functions for
each thread groups
a. Open http://10.30.10.184/imsspl/
b. Click on About Us.
c. Click on Competency.
d. Click on Service Offerings.
e. Click on Why Integra-Services.
f. Click on Careers.
g. Click on Resource Centre.
h. Click on Contact Us.
i. Click on Home.
j. Click on Privacy Policy .
Find how
many
concurrent
users can
perform given
functionalities.
1.Open Jmeter
2.Add 10 Thread groups under test plan
3. Do proxy setting and record the following functions for
each thread groups
a. Open http://10.30.10.184/imsspl/
b. Click on About Us select vision
c. Click on Competency select Mobility Solutions
d. Click on Service Offerings select Contract R&D
e. Click on Why Integra-Services select Value
Proposition
f. Click on Careers select Current Opportunities
g. Click on Resource Centre select Corporate
Profile
h. Click on Contact Us select Corporate
Headquarters
i. Click on Home button at top right corner.
j. Click on Privacy Policy at bottom of page.
Find how
many
1.Open Jmeter
2.Add 10 Thread groups under test plan
concurrent
3. Do proxy setting and record the following functions for
users can
each thread groups
perform given
functionalities. a. Open http://10.30.10.184/imsspl/
b. Click on About Us select News and Events
c. Click on Competency select Networking
d. Click on Service Offerings select I18n and L10n
e. Click on Why Integra-Services select Quality
Policy
f. Click on Careers select Walk-Ins
g. Click on Resource Centre select Case Studies >
Information Development
h. Click on Contact Us select Infrastructure
i. Click on Sitemap button at top right corner.
j. Click on Terms of Use at bottom of page.
Seconds
Throughput : 35/Sec
For 200 users
Average Time taken : 3.72
Seconds
Throughput : 31.2/Sec
For 400 users
Average Time taken : 5.21
Seconds
Throughput : 29.3/Sec
For 800 users
Average Time taken : 9.23
Seconds
Throughput : 28.1/Sec
Results Analysis :
For 100 users
Average Time taken : 1.67 Seconds
Throughput : 34/Sec
For 200 users
Average Time taken : 3.73 Seconds
Throughput : 31.6/Sec
For 400 users
Average Time taken : 5.32 Seconds
Throughput : 29.5/Sec
For 800 users
Average Time taken : 8.43 Seconds
Throughput : 28/Sec
No Response for 840 Users.
Conclusion :
Approximately 800 users can access the server by the given functions
Key scenarios:
Particular number of users will access home page, and top menu options like
About Us, Competency, Service Offerings, Why Integra-Services, Careers,
Resource Centre, Contact Us, Home, Privacy Policy and its sub-menu options
over a given duration.
Defining Workload:
To confirm whether our server is continuously responding well for 2 days
or for 10000 times for the repeated access with the same set of requests.
Metrics to be collected:
Average Response Time and Throughput values will be collected after execution
Test
Description
Verify that 10
users are
simultaneously
able to access
Home Page
page , for
10000 times.
Observation
Server should be able to respond
all the requests successfully.
02
Verify that 10
users are able
to
simultaneously
access About
us page and
options
belongs to that
, for 10000
times.
2. No Of Thread Group = 10
Ramp-Up period = 1
Loop Count is 10000
3. Run Jmeter
03
Verify that 10
users are
simultaneously
accessing
Competency
page and
options
belongs to that
, for 10000
times.
Conclusion :
All Stability cases are Executed successfully 10000 times and All
cases are Passed.
Server Virtualization:
Definition: Server Virtualization is the masking of server
resources, including the number and identity of individual physical
servers, processors, and operating systems, from server users. The
server administrator uses a software application to divide one
physical server into multiple isolated virtual environments. The
virtual environments are sometimes called virtual private servers, but
they are also known as guests, instances, containers or emulations.
It is observed that Virtual Server responds faster Because, its buffer memory(1GB
RAM Memory) is fully dedicated to our Website only. But some portion of RAM
memory of Normal server is reserved for some other applications. Otherwise we can
achieve almost same results in both environment.