Skip to content

Jmeter Testing of the Microservices

nikhilmankame edited this page Apr 1, 2020 · 1 revision

Performance Testing Using Jmeter

  1. An Apache Jmeter based performance testing has been conducted on all the Microservices.
  2. The Jmeter tool aids in conducting the tests using different loads.
  3. Load Tests help identify the maximum number of requests each service can handle as well as the bottlenecks due to which the performance starts degrading
  4. The load tests are conducted via a simulation of the real user scenarios.

Prerequisites for Apache Jmeter

  1. Java version 8 or higher
  2. Multi core CPUs with 4 or more cores
  3. At least 16 GB RAM
  4. 1 Gbps LAN
  5. Blazemeter (Extension from the Chrome Web Store)

Installation Steps

  1. Login to https://jmeter.apache.org/download_jmeter.cgi
  2. Under the Binaries Section, click on the link with .zip extension.
  3. Once the download is complete, extract the contents of the zip file into a new folder.
    1. Windows

    • Place the folder into C:\Program Files
    • Navigate to the bin directory of the installation
    • Double click on the jmeter Windows Batch File to launch the application
    1. Linux

    • Open the command line interface and navigate to the navigate to the bin directory of the installation
    • execute the command ./jmeter
    1. Mac

    • Navigate to the bin directory of the installation
    • Execute the command sh ./jmeter.sh on the terminal

Steps for Testing

  • Login in to the Blazemeter Plugin
  • Assign an identifier / name to the Test E.x. LoginTest
  • Hit the relevant URL for the Login Page
  • Start the recording on the Blazemeter for the LoginTest
  • Login into the interface using credentials
  • Stop the recording on the Blazemeter for the LoginTest
  • Save the recorded file .jmx extension
  • Import the saved jmx file into Apache Jmeter Workspace.
  • Click on the Thread Group and add a number of Users (Load) and the Ramp Up period
  • E.x. If the Users OR Number of Threads = 100 and the Ramp Up Period = 200 seconds then every thread spawned is at a 2 minute interval from its previous and next thread.
  • Right Click on the Thread Group > Select Listeners > click on Graph Results
  • Click on the Triangle shaped Green colored button to start the test.
  • As the test progresses, the results can be viewed by Clicking on the Graph Results under Thread group