Load Test in Jmeter

Starting a Load Test in Jmeter:

To Start a Load Test we set the settings in Thread Group. For example we want to test for 25 users with 10 iterations each.


Parameters in Thread Group (As shown in help):
Attribute
Description
Required
Name
Descriptive name for this element that is shown in the tree.
No
Action to be taken after a Sampler error
Determines what happens if a sampler error occurs, either because the sample itself failed or an assertion failed. The possible choices are:
  • Continue - ignore the error and continue with the test
  • Start Next Loop - ignore the error, start next loop and continue with the test
  • Stop Thread - current thread exits
  • Stop Test - the entire test is stopped at the end of any current samples.
  • Stop Test Now - the entire test is stopped abruptly. Any current samplers are interrupted if possible.
No
Number of Threads
Number of users to simulate.
Yes
Ramp-up Period
How long JMeter should take to get all the threads started. If there are 10 threads and a ramp-up time of 100 seconds, then each thread will begin 10 seconds after the previous thread started, for a total time of 100 seconds to get the test fully up to speed.
Yes
Loop Count
Number of times to perform the test case. Alternatively, "forever" can be selected causing the test to run until manually stopped.
Yes, unless forever is selected
Delay Thread creation until needed
If selected, threads are created only when the appropriate proportion of the ramp-up time has elapsed. This is most appropriate for tests with a ramp-up time that is significantly longer than the time to execute a single thread. I.e. where earlier threads finish before later ones start.
If not selected, all threads are created when the test starts (they then pause for the appropriate proportion of the ramp-up time). This is the original default, and is appropriate for tests where threads are active throughout most of the test.
Yes
Scheduler
If selected, enables the scheduler
Yes
Start Time
If the scheduler checkbox is selected, one can choose an absolute start time. When you start your test, JMeter will wait until the specified start time to begin testing. Note: the Startup Delay field over-rides this - see below.
No
End Time
If the scheduler checkbox is selected, one can choose an absolute end time. When you start your test, JMeter will wait until the specified start time to begin testing, and it will stop at the specified end time. Note: the Duration field over-rides this - see below.
No
Duration (seconds)
If the scheduler checkbox is selected, one can choose a relative end time. JMeter will use this to calculate the End Time, and ignore the End Time value.
No
Startup delay (seconds)
If the scheduler checkbox is selected, one can choose a relative startup delay. JMeter will use this to calculate the Start Time, and ignore the Start Time value.
No
 Note: The difference of Rampup in Loadrunner and Jmeter. In Loadrunner Rampup is defined for each user, whereas in Jmeter it defined for the complete scenario.

Jmeter does not report the results automatically after the completion of the test like other Load Test tools. To do so in Jmeter we need to explicitly define what reports we require. Based upon the reports Jmeter will collect and show the results. We will add  View results in table as below:
TestPlan->Right Click and Add->Listener->View Results in Table


Click on Run and we observe the results as below:


We can also add View Results tree. The View Results Tree shows a tree of all sample responses, allowing you to view the response for any sample. In addition to showing the response, you can see the time it took to get this response, and some response codes. Note that the Request panel only shows the headers added by JMeter. It does not show any headers (such as Host) that may be added by the HTTP protocol implementation.


We can also Response time graph. Results are shown as below:


Comments

Popular posts from this blog

How to use a value between two different threads in Jmeter

Steps to Analyze AWR Report in Oracle

Verifications and Error Handling in LoadRunner *Web_reg_find and Web_reg_save_param*