Jmeter Basics
Jmeter Basics
Jmeter Basics
Basic Requirements
JMeter requires your computing environment meets some minimum requirements. Java Version o JMeter requires a fully compliant JVM 1.5 or higher. Operating Systems JMeter has been tested and works under: o Unix (Solaris, Linux, etc) o Windows (98, NT, XP, etc) o OpenVMS Alpha 7.3+
thread groups.
Careful GUI design allows faster operation and more precise timings.
Terms to Understand
Some Basic terms to understand
Test Plan: A test plan describes a series of steps JMeter will execute when run. A
complete test plan will consist of one or more Thread Groups, logic controllers, sample generating controllers, listeners, timers, assertions, and configuration elements.
Thread Group: Thread group elements are the beginning points of any test plan. All
controllers and samplers must be under a thread group. The thread group element controls the number of threads JMeter will use to execute your test. The controls for a thread group allow you to set Thread properties: Set the number of threads[Users] Set the ramp-up period[in seconds] Set the number of times to execute the test [Loop Count] Each thread will execute the test plan in its entirety and completely independently of other test threads.
Terms to Understand
No. of Threads[Users]: It means to Hits from user we need for particular
threads started. If there are 10 threads and a ramp-up time of 100 seconds, then each thread will begin 10 [100/10] seconds after the previous thread started, for a total time of 100 seconds to get the test fully up to speed.
Time to Execute [Loop Count]:Number of times to perform the test case.
Alternatively, "forever" can be selected causing the test to run until manually stopped.
Terms to Understand
Listeners: The role of Listeners is to listen the Test Results, means
to view, save, and read saved test results. The saving and reading of test results is generic. The various listeners have a panel whereby one can specify the file to which the results will be written. o By default, the results are stored as CSV files, typically with a ".jtl" extension o To read existing results and display them, use the file panel Browse button to open the file. Samplers: Samplers tell JMeter to send requests to a server and wait for a response. They are processed in the order they appear in the tree. Controllers can be used to modify the number of repetitions of a sampler
Terms to Understand
Workbench: The Workbench simply provides a place to temporarily store test
elements while not in use, for copy/paste purposes, or any other purpose you desire. When you save your test plan, Workbench items are not saved with it.
Logic Controllers: Logic Controllers let you customize the logic that JMeter
uses to decide when to send requests. Logic Controllers can change the order of requests coming from their child elements. They can modify the requests themselves, cause JMeter to repeat requests, etc.
Median: Midway value Throughput: Throughput measured in requests per second/minute/hour Error %: % of requests with error Average: Average time taken by the script to complete
Terms to Understand
Schedulers: When using the scheduler, JMeter runs the thread group until either the number of loops is reached or the duration/end-time is reached
o Start Time: JMeter will wait until the specified start time to begin testing. o End Time: JMeter will stop at the specified end time. o Duration(Sec): JMeter will use this to calculate the End Time.
o Startup Delay(Sec): JMeter will use this to calculate the Start Time
Standard deviation: It is a widely used measurement of variability or diversity used in statistics and probability theory. It shows how much variation or "dispersion" there is from the average (mean, or expected value). A low standard deviation indicates that the data points tend to be very close to the mean, whereas high standard deviation indicates that the data are spread out
Types of Listeners
View Results Tree: Allowing you to view the response for any sample in Tree view [Sampler Result, Request, Response Data] 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 Aggregate Report: Same as Summary Report View Results in Table: Same as View Results but uses a lot memory
RUN Screen
Where we can Start recording using Run Option and the shortcut is Ctrl+r
Analyzing Test
Aggregate Report View
Analyzing Test
View Results in Tree
Analyzing Test
View Graph Results
Functional Test Option should uncheck Default Port is 8080 Default Extension for Test Plan is .jmx Default Extension for Test Script is .jtl All the other web site should close All the plugins should also stop Use Browse button to save scripts from Listeners
Doesnt record https.
it from the start while youre developing your application Its open source. You may modify it or add new features--if you have the time and skills Disadvantages Its open source! Theres no guarantee of support or further development. However, I dont consider this a real problem with a tool like JMeter, which easily can be replaced by another tool. Getting "correct" response times from JMeter forces you to understand how to make a realistic client/server setup. Doesnt record https.
22