JMeter-1: Introduction to JMeter


What is JMeter?

Apache JMeter is an Apache project that can be used as a load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications.

JMeter can be used as a unit test tool for JDBC database connections, FTP, LDAP, Webservices, JMS, HTTP, generic TCP connections and OS Native processes. JMeter can also be configured as a monitor, although this is typically considered an ad hoc solution instead of advanced monitoring solutions. It can be used for some functional testing as well.

JMeter supports variable parametrization, assertions (response validation), per thread cookies, configuration variables and a variety of reports.

JMeter architecture is based on plugins. Most of its “out of the box” features are implemented with plugins. Off-site developers can easily extend JMeter with custom plugins.  (ref: Wikipedia.org)

Jmeter Features

  • JMeter %100 pure java , open source application
  • Designed for Load/ Performance/ Stress Testing
  • You can write your own script
  • Simulate heavy loads
  • Visual feedback
  • Distributed Testing
  • Support different protocols , Http , Ftp, Ldap, Soap
  • Multi platform support
  • Multithreading
  • Caching & Offline Analysis

General Flow

Jmeter_Flow


Test Plans consist of:

  • Thread Groups
  • Samplers
  • Logical Controllers
  • Listeners
  • Timers
  • Assertions
  • Configuration Elements
  • Pre- processors
  • Post- processors

JMeter Modes

1- GUI Mode

2- Server Mode

3- Command Line Mode

1- GUI Mode: After download and extract it, you can find it inside this path: “/bin/jmeter.bat”

2- Server Mode: Server Mode is used for distributed testing , use client – server model.

3- Command Line Mode(non-gui mode): If you have limited memory don’t want GUI frozen, you can use this mode. Go to bin folder of your JMeter installation from command prompt, type the following command:

jmeter -n -t D:\TestScripts\script.jmx -l D:\TestScripts\scriptresults.jtl


-n

[This specifies JMeter is to run in non-gui mode] -t  [name of JMX file that contains the Test Plan] -l  [name of JTL file to log sample results to]

JMeter Directory Structure

JMeter automatically finds classes from jars in the following directories:

  • JMETER_HOME/lib: used for utility jars
  • JMETER_HOME/lib/ext: used for JMeter components and plugins

Folder structure

bin contains the .bat and .sh files for starting Jmeter. It also contains ApacheJMeter.jar and properties file
docs directory contains the JMeter documentation files
extras ant related extra files
lib contains the required jar files for Jmeter
lib/ext contains the core jar files for jmeter and the protocols
src contains subdirectory for each protocol and component
test unit test related directory
xdocs Xml files for documentation. JMeter generates documentation from Xml.

javafx

Database Operations in JavaFX

By Onur Baskirt / Apr 1, 2016 / 56 Comments
Before started this section, please check the first article and learn How to Start JAVAFX! http://www.swtestacademy.com/getting-started-with-javafx/ At first, part of JavaFX tutorial series, we created a sample JavaFX project, designed the draft version of the UI and set up an...
rest assured

REST API Testing with Rest Assured

By Onur Baskirt / Mar 8, 2016 / 32 Comments
Outline In this post, I will explain what is API and API testing, what is the difference between SOAP and REST services, and how to test REST APIs with Rest Assured Library. What is API? API stands for Application Programming...
extentreports

How to Write Effective CSS Locators

By Onur Baskirt / Oct 1, 2017 / 0 Comments
Hi all, in this tutorial, I will describe you how to write effective CSS locators to interrogate web elements for your automation projects. As a rule of thumb, your interrogation strategy should be in below order: First try to use...
extentreports

Selenium-11: Execute JavaScript with JavascriptExecutor

By Onur Baskirt / Jan 27, 2016 / 15 Comments
Outline Sometimes we cannot handle some conditions or problems with Webdriver, web controls don't react well against selenium commands. In this kind of situations, we use Javascript. It is useful for custom synchronizations, hide or show the web elements, change...
javafx

Getting Started with JavaFX

By Onur Baskirt / Mar 25, 2016 / 0 Comments
When I started to work in my current position, one of my task is to do manual operations for campaign products  every week. After the second week, I thought that I have to automate this task using a GUI based...
extentreports

How to Write Smart XPath Locators

By Onur Baskirt / Sep 24, 2017 / 4 Comments
Hi all, in this tutorial, I will describe you how to write smart and non-brittle XPath locators. When we write our test scripts, we generally prefer to use id, name, class, etc. these kinds of locators. However, sometimes we could not...
extentreports

Selenium-1: Quick Start to Automation with Selenium WebDriver & JAVA & JUnit & Maven & IntelliJ

By Onur Baskirt / Sep 8, 2015 / 26 Comments
Outline Selenium Webdriver is the most popular open source web test automation framework across wide range of browsers and platforms. In this tutorial you will learn how to do web test automation with Selenium Webdriver and the related tools. Audience...
page object model

Page Object Model with C#

By Ege Aksoz / Jun 18, 2017 / 8 Comments
In the previous tutorial, we’ve taken the initial steps and entered the world of automated testing. We also wrote our first automated test. From this point on, since we are not just going to write one test, we need to...
extentreports

How to Select a Date From DatePicker Using Selenium

By Onur Baskirt / Aug 13, 2016 / 6 Comments
When you need to automate a airway, hotel, or similar websites you need to deal with Datepickers and some times it is a little bit cumbersome to select a specific date on the Datepicker or calendar.  In this post, I...
extentreports

Selenium Webdriver Performance testing with Jmeter and Selenium Grid

By Ozgur Kaya / Aug 9, 2016 / 2 Comments
In this post, we will complete Selenium Webdriver Performance testing scenario using Jmeter and Selenium Grid. 1- Install Java 7 or later If necessary https://java.com/tr/download/ 2- Download latest Jmeter version 3.0 or higher. http://jmeter.apache.org/download_jmeter.cgi 3- Download Jmeter PluginsManager JAR file and...
By | 2017-01-13T21:33:47+00:00 December 21st, 2015|Jmeter, Performance Testing|0 Comments

About the Author:

Onur Yazir
Onur YAZIR is a Senior Software Testing & Deployment Engineer 7+ years of experience. He has worked at Huawei, Ericsson, Teknosa as Software Test Engineer. After that, he worked as DevOps Engineer at London-based fintech company EFT Software. Now, he is a DevOps Engineer at Gulf News Dubai Office. You can find detailed information about him on his linked-in page.

Leave A Comment