Home> Java> javaTutorial> body text

Volume Testing With Apache Jmeter On Windows.

PHPz
Release: 2024-08-21 06:59:41
Original
886 people have browsed it

Volume Testing With Apache Jmeter On Windows.

In this article, I'll be walking you through how we can perform volume testing on different applications. Before I demonstrate how we make volume testing using Jmeter, Here's my own understanding of what volume testing means and why we need to run volume testing on applications before deploying to production.

Volume Testing With Apache Jmeter On Windows.

Volume testing: In a very simple term, Volume testing is designed to check how a system handles large amounts of Data. Different companies employ this method of testing to ensure that their service can manage an expected volume of data without significant degradation in performance or data loss.

Why do we perform volume testing?
Here are some reasons why we take this step:

  1. To help identify if our system is capable of ingesting, storing, and processing a large dataset effectively.

Volume Testing With Apache Jmeter On Windows.

  1. To gain insights into the performance metrics of our application, system, or service. Metrics such as response time, resource utilization, throughputs, etc.

Now that we have a little understanding of what volume testing is, let us proceed to the demonstration. For this demo, we will be using Apache JMeter. The Apache JMeter™ application is open-source software, a 100% pure Java application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. Here's a list of what we can test with Apache JMeter:

  • Web - HTTP, HTTPS (Java, NodeJS, PHP, ASP.NET, …)
  • SOAP / REST Webservices
  • FTP
  • Database via JDBC
  • LDAP
  • Message-oriented middleware (MOM) via JMS
  • Mail - SMTP(S), POP3(S) and IMAP(S)
  • Native commands or shell scripts
  • TCP
  • Java Objects

to install Apache we will need to install jdk8 or Above:
Download the Java Development kit here.

After downloading the package, unzip it in your program files directory:

Volume Testing With Apache Jmeter On Windows.

Set Java as an environment variable on your PC:

windows home>>>search "edit environment variables">> path>>>edit>> pass in the path to your java binary directory which should be "C:Program FilesJavajdk-22bin", save and exit.
Up next is to install Apache Jmeter. Follow this link to download the zip file.
Extract the file on the program file directory on your C drive "C:Program Filesapachejmeter".
to navigate to the directory of the JMeter installation and execute the Apachejmeter execution file on your windows powershell to start the service.

Volume Testing With Apache Jmeter On Windows.
Run this command but replace it with the absolute path of your jar execution file location:

PS C:\Program Filesapache-jmeter-5.6.3\apache-jmeter-5.6.3\bin> .\ApacheJMeter.jar
Copy after login

Jmeter will automatically start. Here are some terms you should know when working with Jmeter:

  1. Test plan: This is a name you give to a test case. For example, you are trying to test facebook web application, you can name it "facebook-test-app".

Volume Testing With Apache Jmeter On Windows.

  1. Threads: Threads or thread groups can be defined as virtual users or user groups we can use to test the performance of our application. We can use threads to run up a high amount of requests to a defined path, we can group these threads to send 100s of requests at once. The more threads we configure the higher the load on the application. Initially, there are four types of threads that are configured by default, we can add more by using the Jmeter plugin manager. To install the plugin, check Here.. When you install it. You can find it on the "Options" tab at the top of the page.

Volume Testing With Apache Jmeter On Windows.

Search for "Custom Thread Groups" in available plugin, select and scroll down the click "apply changes and restart". After this you will be able to see the multiple thread groups in jmeter like this:

Volume Testing With Apache Jmeter On Windows.

  1. 샘플러: 이 구성 요소는 지정된 서버에 요청을 보냅니다. 샘플러 유형은 HTTP 요청, FTP 또는 SMTP일 수 있습니다.

Volume Testing With Apache Jmeter On Windows.
위의 이미지는 귀하의 필요에 맞게 Jmeter가 지원하는 수많은 샘플러를 표시합니다.

Volume Testing With Apache Jmeter On Windows.

다음은 필요한 모든 세부 정보가 포함된 HTTP 요청 샘플러의 모습을 보여주는 예입니다.

  1. 청취자: 샘플러에서 테스트 케이스를 실행할 때 보고서가 필요하죠? 청취자들이 하는 일이 바로 그것이다. 테이블, 그래프, 차트 등 모든 형식의 데이터를 수집하고 표시하는 일을 담당합니다. 수집되는 일부 데이터에는 응답 시간, 처리량, 오류율, 응답 코드 등이 있습니다.

데모:
이 데모를 시작하려면 필요한 설치를 모두 완료했는지 확인하세요.

먼저 wordpress-test라는 테스트 계획을 만듭니다.

Volume Testing With Apache Jmeter On Windows.

다음으로 스레드 그룹을 만듭니다.

Volume Testing With Apache Jmeter On Windows.
스레드 그룹에 정의된 설정에 대한 설명입니다. 스레드 그룹에는 1000명의 사용자가 있으며, 20명은 0초 후에 한 번에 GET 요청을 보냅니다. 그런 다음 5초의 증가 시간을 사용하여 15초마다 10개의 요청을 추가합니다. 1000개의 요청이 전송된 후 사용자는 최종적으로 요청 전송을 중지하기 전까지 60초 동안 대기합니다. 감소율은 초당 사용자 5명입니다.

스레드 그룹을 구성한 후 지정된 경로에서 GET 요청을 수신하기 위해 HTTP 요청 샘플러를 추가합니다.

Volume Testing With Apache Jmeter On Windows.

Volume Testing With Apache Jmeter On Windows.
구성을 저장하고 리스너를 추가하여 결과를 트리 또는 테이블 형식으로 표시하세요. 테스트를 시작하려면 녹색 "재생" 버튼을 클릭하세요.

Volume Testing With Apache Jmeter On Windows.

됐어요! 이것이 jp@gc - Stepping Thread Group을 사용하여 볼륨 테스트를 실행하는 방법입니다.
질문이 있으시면 X(FKA 트위터) @marviigrey를 통해 저에게 연락하실 수 있습니다. 시간 내주셔서 감사합니다. 안녕

The above is the detailed content of Volume Testing With Apache Jmeter On Windows.. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!