Part 1: Introduction and installation of Jmeter

Tram Ho

1. What isPerformance testing?

Performance testing is the performance of testing to determine if a system is responsive and stable under high load requirements. It can serve to investigate, measure, validate or verify the quality of a system’s attributes: volatility, reliability, and resource usage.

Load testing : Modeling intended to be used by more than one user accessing a website service at the same time.

Stress testing : All web servers can load a large amount, when the load goes out of limit, the web server starts to respond slowly and cause errors. The purpose of stress testing is to be able to find out how much load the web server can handle.

2. Introduction about Jmeter

Jmeter is an open source testing software, it is 100% Java application for loading and testing performance. It is designed to cover all types of testing such as load, functionality, performance, etc … and it requires JDK 5 or higher.

  • Open source, free
  • Simple, intuitive interface that is easy to use
  • You can test many types of server: Web – HTTP, HTTPS, SOAP, Database – JDBC, LDAP, JMS, Mail – POP3, …
  • A stand-alone tool that can run on many different operating systems, on Linux you only need to run with a shell script, on Windows you only need to run a .bat file.
  • Multithreading, which helps to create many requests at the same time, efficiently process the collected data.
  • Extensible, there are many freely available and widely shared plugins.
  • An automated tool for testing application performance and functionality.

How it works: 1.Jemeter simulates a group of users sending requests to a server, receiving and processing responses from server 2.Jmeter can provide the majority of graphical analysis of performance reports. .

JMeter Performance Testing includes:

  • Load testing : simulating many users accessing a website service at the same time.
  • Stress testing : All web servers can load a large amount, when the load goes out of limit, the web server starts to respond slowly and cause errors. The purpose of stress testing is to be able to find out how much load the web server can handle.

3.Jmeter installation

  • Install Java JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html
  • Set JAVA_HOME: My Computer -> Properties -> Advance System Settings -> Environment variables -> System variables -> New Variable name: JAVA_HOME Variable value: path to the JDK folder
  • Set Path: Add% JAVA_HOME% bin; into System Path
  • Download Jmeter and extract the folder C: Jmeter: http://jmeter.apache.org/download_jmeter.cgi
  • Run Jmeter: Go to folder C: Jmeter bin Run jmeter.bat file

4. Jmeter’s user interface

Test Plan

Test plan is where you add the elements (Elements) necessary for your testing process. It stores all the elements and corresponding settings in order to run the test as desired.

WorkBench

WorkBench is simply a place to store the temporary test results and has no relationship with the Test Plan. Jmeter will not save the contents of WorkBench, but only save the contents of the Test Plan.

Add Element

Adding Elements is an essential step to building a Test Plan because without the Elements, JMeter will not be able to run your Test Plan. A Test Plan includes many Elements such as Listener, Controller, and Timer You can add an element to test the plan by right-clicking on the Test Plan and selecting new Elements from the “Add” list. You can also remove an unused Element from the Test Plan by selecting Remove

Save Element

Right click on the element and choose Save Selection As JMeter Test Elements and the Test plan is stored in * .JMX format. JMX stands for Java Management Extensions.

Load Element

Right click on the element, choose Merge.

Element configuration

Select Element in the left tree. Configure in the right frame

Run and stop the Test Plan

Before running the Test Plan, you must save the Test Plan first. Select File -> Save Test Plan as, enter the file name and click Save.

To run one or more Test Plan, select Start (Ctrl + R) from the Run menu

To stop testing, select Stop (Ctrl + ‘.’)

Test Report

After running the test, you will receive a test report. Test report includes errors, log file stored in jmeter.log and test result summary.

5. Steps to perform performance test with Jmeter

Source Reference: https://www.guru99.com/jmeter-tutorials.html

Share the news now

Source : Viblo