top of page

Test Performance with Jmeter

  • Writer: mohdmyyusuf
    mohdmyyusuf
  • Nov 11, 2021
  • 2 min read

Updated: Nov 19, 2021

Execution order of jmeter elements:

If multiple elements are added to a Test Plan in Jmeter, the execution order will be as follows: config elements > pre-processors > timers > samplers > post processor > Assertions > Listeners


There are different components in Jmeter which are called Jmeter elements.


Samplers are different type of requests sent by thread groups. The user request could be an HTTP request, JDBC request or FTP request.


Listeners shows the results of the test execution. They can show the result in different formats like tree, table graph or log files.


Latency is the difference between the time when the request is sent to the server and response is returned back to client or response is started to be received.


Response time = Latency + request processing time


We can run jmeter in two ways:

The differences in different options in Jmeter are worth knowing to work on it efficiently.

Run and Run remotely:

When we run the script on the same machine use the option Run. When we run the script remotely, select the option Run remotely.


Stop and Shut down:

If stop option is selected, the execution is stopped immediately. If Shutdown is selected, it lets the current thread to complete first and it does not stop it incomplete.


Log viewer: go to options > Log viewer > Log level.


To run the jmeter in non GUI mode run the cmd as administrator and then change directory to "bin" of jmeter. Now type command:

jmeter -n -t testName.jmx -l <path to save the result>\filename.jtl

The .jtl file is saved to the location and it can be opened in excel. The report can be generated by uploading the script on Blazemeter site and run it there in simple steps as follows:

  1. Create the account on Blazemeter.

  2. Create the jmeter script using the jmeter.

  3. Upload the .jmx file(jmeter script to blazemeter site).

  4. Save it and run it.

  5. User can save the



-------------------------------------------------------

To run the Jmeter in multiple slave machines some configurations are required to be done. Before doing that let's understand why we need it.



To integrate the selenium with Jmeter, follow the steps below:


  1. Export the selenium code in jar file.

  2. Copy the jar file and go to apache-jmeter > lib > junit

  3. Paste the jar file here.

  4. Now open jmeter and create a thread group.

  5. Add a junit request instead of http sampler.

  6. Click the checkbox "Search the junit 4 annotations" in Junit request window.

  7. Select the class name and method name in the dropdowns.

  8. Add listener etc and that's it.

It is not a good practice to run the script in by opening multiple instances of browsers, so we should use the concept of headless browser. We can use html-unit driver instead of any other

browsers.

 
 
 

Recent Posts

See All
Jenkins and its Set Up

CI/CD it is a practice which help in a ready to deploy code creation. Jenkins is an open source continuous integration server written in...

 
 
 
Powershell and VMs

The Powershell is used for system administration so it is a command line shell or scripting language. For different operating systems,...

 
 
 

Comments


Subscribe Form

Thanks for submitting!

8810487385

  • Facebook
  • Twitter
  • LinkedIn

©2021 by testinggeeks. Proudly created with Wix.com

bottom of page