Skip to main content

JMeter Turorials

JMeter is one of the most prominent load testing tool in the field of performance testing. JMeter can be used to carry out performance testing not just for web but also web services, database, LDAP, SMTP, POP3 etc. There is tons of JMeter documentation available online, but if you are beginning with JMeter or Load Testing in general then you might be overwhelmed with the amount of information available online. Following JMeter training video tutorial series tries to make it easy to learn JMeter. This JMeter training video tutorial series focuses on most important aspects of JMeter along with code examples for JMeter. Given that technology changes with time so as the JMeter hence following JMeter training series is expanding with time. So what are you waiting for? Hope on to learning JMeter


Before watching JMeter training videos, you may like to read following tutorials on Performance Testing -





JMeter project file used in tutorial projects can be downloaded as raw version and then you can import it in your JMeter test plan. Other JMeter Project Files are also available for download.



JMeter Training Content

JMeter Training Video/Tutorial



  • Introduction to JMeter
  • What can you test with JMeter
  • Download JMeter and start JMeter
  • Elements of a JMeter test plan
  • Test Plan

  • Thread Group

  • Sample and Logical Controller

  • HTTP Request Sampler

  • Once only controller, Interleave Controller

  • Config Elements - CSV Data Set Config, HTTP Request Default, HTTPCookie Manager
  • Listeners







More on JMeter listeners -


  • Graph results listener
  • View Results Tree
  • Assertion Results
  • Aggregate Report
  • CSV Log Format
  • XML Log Format







Creating first JMeter test -


  • Record JMeter test using badboy
  • Import jmx file to JMeter
  • Loop Controller
  • Analyze Sampler recorded from Badboy
  • Rename Sampler
  • Add Response Assertion to mercury Registration sampler
  • Add Listeners - View Results in Tree and Aggregate Report
  • Run test and analyze results

  • Modify Response Assertion to raise false alarm and run test again







JMeter Timer and Scoping rules -
  • Timers
  • Scoping Rules
  • Execution Order
  • jmeter.properties file






  • jmeter.log file
  • Functional testing setting in test plan
  • JMeter HTTP Sampler
  • HTTP Default Config element
  • Response assertion







JMeter and AJAX request -

  • Adding user defined variable in Test Plan, ex: App URL

  • Ajax request Example - zalando-UK site

  • Replay the ajaxified JMeter script and analyze failure

  • Analyze the ajax request again with firebug and observe headers

  • Observe -

    • xsrfToken in Response Data for first request

    • X-XSRF-Token passed in header manager of ajax request

  • Introducing Regular expression extractor - Post Processor Element

  • Rerun the modified script








JMeter non GUI test execution-

  • Storing JMeter results in non GUI run mode

  • Executing JMeter tests in non GUI mode

  • File Format for JMeter reports in xml file

  • File format for JMeter reports in csv format






(adsbygoogle = window.adsbygoogle || []).push({});





JMeter and CSV Data Set Configuration -

  • Using JMeter Template “Recording Template”

  • Using csv data set configuration to parameterize data

  • Location of CSV file

  • HTTP Request Sampler - “Embedded Resources from HTML files”

  • > “Retrieve All Embedded Resources”

  • Run test with thread count 2

  • View csv test data in JMeter HTTP sampler

  • View downloaded resources in View Results in Tree listener







HTTP Cache Headers -


Response Headers -

  • Cache-control

  • Expires

  • Last-Modified

  • ETag


Request Headers -

If-Modified-Since

If-None-Match

HTTP cache headers









  • HTTP Cache Manager
  • Running Test from command line







HTTP Cookie Manager -

  • Cookie Manager Element
  • Running test with and without cookie manager







Transaction Controller -

  • Using Transaction Controller
  • Modes of operations of transaction controller







User Defined Properties -
  • User defined properties
  • HTTP Request Default
  • Execute test using shell script and view Results in Table
  • Execute test for 2 threads and view Results in Table
  • Save results in xml format and view results in Tree
  • Save response data on error and view results in Tree






JMeter custom graph -
  • Why use Custom Graphs
  • Setup JMeter Plugins
Jmeter plugin download - http://jmeter-plugins.org/downloads/all/#Latest-Stable-Release

Plot custom graph -
  •    Active Threads Over Time
  •    Response Times Over Time
  •    Transactions per Second
  •    Server Hits per Second (aka Hits per second)
  •    Response Times Percentiles

Combine multiple graphs using Composite Graph







Graph Generator Listener -
  • JMeterPlugins-Extras is for Graphs Generator Listener (from JMeterPlugins-ExtrasLibs jar)
  • Graphs Generator Listener generates the following graphs at end of test or previous test - :
   
Active Threads Over Time
Response Times Over Time
Transactions per Second
Server Hits per Seconds
Response Codes per Second
Response Latencies Over Time
Bytes Throughput Over Time
Response Times vs Threads
Transaction Throughput vs Threads
Response Times Distribution
Response Times Percentiles

  • Generate CSV / PNG for current test results
Requires usages of View Results Tree or Graphs Generator Listener     
Not recommended !

  • Generate CSV / PNG for existing/previous test results







JMeter Backend Listener


  • Test Plan deep dive into seleniumtests.com.jmx test plan
  • Enable View Results Tree listener and Run Test
  • Check that data is pushed in influx db > jmeter database - http://localhost:8083/
  • Disable View Results Tree listener and Run Test from command line.
  • Grafana Dashboard
  • Analyze Grafana Dashboard - http://localhost:3000/
  • Edit board and view query
  • Off line Analysis - Once test run is over then update time stamp and view result of past run

You will find following files -

Test Plan
script2.sh
Grafana Dashboard json file > to import and create Grafana dashboard






Introduction to JMeter 3.0 -
  • What's new with JMeter 3.0
  • Validate feature
  • Sample timeout feature
  • Summarizer display







JMeter Reporting Dashboard -
  • How to generate JMeter Dashboard
  • Apdex, Jmeter graphs and charts
  • Graph properties







Comments

Popular posts from this blog

Appium and android mobile app automation

Next appium and Android mobile app automation video tutoria l is live. If you are new to appium then please check - appium-tutorial This video tutorial covers - Start vysor (Just for this session and not mobile automation :)) Start appium and start appium inspector Desired Capabilities platformName - Android deviceName - L2N0219828001013 (as seen on "adb devices") Saved Capability Sets Start Session Scan app elements using appium inspector Get appPackage and appActivity using "APK info" app Install "APK info" app and open app whose appPackage and appActivity are required i.e. calculator Check top section of app icon com.android.calculator2 is app package com.android.calculator2.Calculator is app activity testng.xml file settings for running Android app tests Test details com.seleniumtests.tests.mobile.AndroidAppTest and CalculatorScreen class View beautiful STF test report  

Return only first or last element from webelements collection

Note: If you are new to java and selenium then start with selenium java training videos .     We often come across situation when there are multiple elements on a page and we probably like to exercise only a few of them using selenium webdriver. May be just first and last element. For example on a search result page we may like to click on only first and last link and not all. This is when Iterables API comes handy. (By the way I am assuming that you have already completed watching selenium training videos :)). Once we have collection of web element then we can use Iterables to get only first or last element as following - Consider that we fetch collection of element as - List< WebElement > webElements = getDriver().findElements(By. id ( "htmlID" ));   Now we can get the first web element from this collection as -  WebElement firstElement = Iterables. getFirst (webElements,  getDriver().findElement(By. id ( "defaultElement" )));   Herein second

Using chrome console to test xPath and css selectors

Note: If you are new to java and selenium then start with selenium java training videos .       Since the advent of selenium there have been many plugin to test xPath / css selectors but you don’t need any of them if you have chrome browser. Using Chrome console you can test both xPath and css selectors. Launch website to be tested in chrome browser and hit F-12 and you would see chrome console opened in lower pane of application - Hit escape key and console would open another pane to write element locators - And now you can start writing xPath or css selectors in chrome console and test them - The syntax for writing css id - $$(“ ”) And hit the enter key. If your expression is right then html snippet of the application element corresponding to the css selector would be displayed - If you mouse over the html snippet in chrome console then it would highlight the corresponding element in application - If you want to clean console of previously wri