本博文jmeter介绍的是在windows下使用,linux后期看情况更新,谢谢

简单介绍,想更多了解的去官方,多的很:

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.

What can I do with it?

Apache JMeter may be used to test performance both on static and dynamic resources, Web dynamic applications. 
It can be used to simulate a heavy load on a server, group of servers, network or object to test its strength or to analyze overall performance under different load types.

Apache JMeter features include:

    • Ability to load and performance test many different applications/server/protocol types:

      • 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
    • Full featured Test IDE that allows fast Test Plan recording (from Browsers or native applications), building and debugging.
    • CLI mode (Command-line mode (previously called Non GUI) / headless mode) to load test from any Java compatible OS (Linux, Windows, Mac OSX, …)
    • A complete and ready to present dynamic HTML report
    • Easy correlation through ability to extract data from most popular response formats, HTMLJSONXML or any textual format
    • Complete portability and 100% Java purity.
    • Full multi-threading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.
    • Caching and offline analysis/replaying of test results.
    • Highly Extensible core:
      • Pluggable Samplers allow unlimited testing capabilities.
      • Scriptable Samplers (JSR223-compatible languages like Groovy and BeanShell)
      • Several load statistics may be chosen with pluggable timers.
      • Data analysis and visualization plugins allow great extensibility as well as personalization.
      • Functions can be used to provide dynamic input to a test or provide data manipulation.
      • Easy Continuous Integration through 3rd party Open Source libraries for Maven, Gradle and Jenkins.

建议软件大家都从官方下载,最新版,安全可靠值得信赖

基础了解完了,开始下载吧,jmeter是纯java的程序,需要java环境才能使用,所以先下载一个jdk

java的官方直接下载https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

jmeter官方直接下载:https://jmeter.apache.org/download_jmeter.cgi

1、点击下载

2、下载二进制的zip:

别问其他的是干啥的,我也不知道,下载zip就对了

下载完之后进行解压 ,解压之后是这个包:

不需要安装,解压之后直接使用,下面介绍一下每个文件夹的作用,为啥介绍,那肯定有用,萌新铭记呦

1、backups :备份,jmeter项目脚本

2、bin : 启动文件和配置文件

  (1)、ApacheJMeter.jar 启动文件

  (2)、jmeter.bat cmd 启动文件,后台会开一个cmd窗口

  (3)、jmeter.sh linux 启动文件

  (4)、jmeter.properties 系统配置文件

  (5)、jmeter-server.bat windows 分布式测试 服务器配置

  (6)、jmeter-server linux 分布式测试 服务器配置

3、docs : 接口文档目录

4、extras : 扩展插件目录

5、lib : 用到的插件目录,里面都是jar包,jmeter使用过程中会在lib和extras目录下寻找需要的类

6、licenses : 证书目录

7、printable_docs : 用户使用手册,大家自学不懂的时候也可以看里面文档  (有不懂得可以多看看,挺不错的,虽然版本有点老)

1、性能基本知识  -  先大概过一遍每个插件的大概含义,下面再开始进行性能或接口测试,请看另外博文

测试片段 - 控制器上的一个特殊的线程组,和线程组是一个层级,但是他是不被主动执行的 ,除非它是一个模块控制器或者是被控制器引用才会执行

配置元件 - 用于对静态数据配置的支持 ,如CSV,Data ,config可以将本地数据文件形成数据池

定时器 -  操作之间设置等待时间 ,多种类型定时器,后面可能会用到

前置处理器 - 用于实际的请求发出之前对即将发出的请求进行特殊处理,如HTTP ,URl 重写修复符

后置处理器 - 对发出请求后得到的服务器响应进行处理,一般用来提取响应中的特定数据

断言 - 用于检测测试中得到的相应数据是否等于预期结果,设置检查点 ,如果没有满足断言则是失败case

监听器 - 用来对测试结果进行处理和可视化展示的一系列, 图形结果,查看结果树,聚合报告,都是常用的

取样器 - 向服务器发送请求,根据不用协议有不用的取样器

逻辑控制器 - 2类 ,一类是用于控制test plan中sampler节点发送请求的逻辑顺序的控制器,一类是用来组织可控制sampler节点的!

用户使用手册里的分布式测试:

25. Apache JMeter Distributed Testing Step-by-step

This short tutorial explains how to use multiple systems to perform stress testing. Before we start, there are a couple of things to check.

  • the firewalls on the systems are turned off or correct ports are opened.
  • all the clients are on the same subnet.
  • the server is in the same subnet, if 192.x.x.x or 10.x.x.x IP addresses are used. If the server doesn't use 192.xx or 10.xx IP address, there shouldn't be any problems.
  • Make sure JMeter can access the server.
  • Make sure you use the same version of JMeter and Java on all the systems. Mixing versions will not work correctly.
  • You have setup SSL for RMI or disabled it.

Once you've made sure the systems are ready, it's time to setup remote testing. The tutorial assumes you already have JMeter installed on all the systems. The way JMeter works is one master controller initiates the test on multiple slave systems.

In this tutorial we use GUI Mode just for demonstration. In real life you should use CLI mode (NON GUI) to start your load test

One master controls multiple slaves
25.1 Terminology

Before we dive into the step-by-step instructions, it's a good idea to define the terms and make sure the definition is clear.

Master
the system running JMeter GUI, which controls the test
Slave
the system running jmeter-server, which takes commands from the GUI and send requests to the target system(s)
Target
the webserver we plan to stress test

Categories of systems
 
25.2 Step-by-Step
  1. On the slave systems, go to jmeter/bin directory and execute jmeter-server.bat (jmeter-server on unix).
  2. On master system acting as the console, open windows explorer and go to jmeter/bin directory
  3. Open jmeter.properties in a text editor
  4. Edit the line remote_hosts=127.0.0.1
  5. Add the IP address. For example, if I have JMeter server running on 192.168.0.10, …, 192.168.0.15, the entry would like like this:
    remote_hosts=192.168.0.10,192.168.0.11,192.168.0.12,192.168.0.13,192.168.0.14
  6. Start JMeter.
  7. Open the test plan you want to use

Simple test plan
 
25.2 Starting the Test

At this point, you are ready to start load testing. If you want to double check the slave systems are working, open jmeter.log in your editor. You should see the following in the log.

Writing log file to: /XXXX/XXXXX/bin/jmeter-server.log
Created remote object: UnicastServerRef [liveRef: [endpoint:[192.X.X.X:XXXXX](local),objID:[-6a665beb:15a2c8b9419:-7fff, 3180474504933847586]]]

If you do not see this message, it means jmeter-server did not start correctly. For tips on debugging the issue, go to the tips section. There are two ways to initiate the test: a single system and all systems.

 
25.3 Start a single clients
  1. Click Run at the top
  2. Select Remote Start
  3. Select the IP address

Start a single slave
 
25.4 Start all clients
  1. Click Run at the top
  2. Select Remote Start all or use Ctrl + Shift + R

Start all slaves
 
25.5 Limitations

There are some basic limitations for distributed testing. Here's the list of the known items in no specific order.

  1. RMI cannot communicate across subnets without a proxy; therefore neither can JMeter without a proxy.
  2. Since version 2.9, JMeter sends all the test results stripping Response data to the controlling console, this allows us to reduce impact on network IO. Ensure you monitor your network traffic so that this traffic does not incur contention
  3. A single JMeter client running on a 2-3 GHz CPU (recent CPU) can handle 1000-2000 threads depending on the type of test.
 
25.6 Additional resources

Wiki page on remote testing

Remote Testing in the user manual

 
25.7 Tips

In some cases, the firewall may still be blocking RMI traffic.

Anti Virus and Firewall

Antivirus should be stopped during a Load Test as it can drastically impact timings leading to wrong results.

Firewall needs to be stopped from windows services or at least some ports need to be opened.

  1. Open control panel
  2. Open administrative tools
  3. Double click services
  4. Go to down to Symantec anti virus, right click and select stop

Windows firewall

  1. Open network connections
  2. Select the network connection
  3. Right click and select properties
  4. Select advanced tab
  5. Uncheck internet connection firewall

Linux

On Linux, iptables might be turned on by default. For instructions, please refer to the Remote Testing in the user manual

On RedHat (or derivatives), iptables is turned on by default. Execute

service iptables stop

to stop the Linux firewall or ensure you open the correct ports.

jmeter工具下载及工具功能操作介绍的更多相关文章

  1. jmeter(一)工具介绍(二)

    1.Jmeter 概要描叙 jmeter 是一款专门用于功能测试和压力测试的轻量级测试开发平台.多数情况下是用作压力测试,该测试工具在阿里巴巴有着广泛的使用,估计是不要钱吧,哈哈,功能上来说,整个平台 ...

  2. .NET读写Excel工具Spire.Xls使用(1)入门介绍

    原文:[原创].NET读写Excel工具Spire.Xls使用(1)入门介绍 在.NET平台,操作Excel文件是一个非常常用的需求,目前比较常规的方法有以下几种: 1.Office Com组件的方式 ...

  3. 多功能网页刷新工具,刷pv工具

    多功能网页刷新工具,刷pv工具,在线刷流量,刷PV,刷UV小牛刷新助手功能介绍:1.设置多个刷新网页地址.2.设置刷新时间3.开始工作4.其他操作:老板键:打开时自动刷新:置系统托盘5.可手动输入地址 ...

  4. 【JMeter】压力测试工具的概览与使用

    软件工程综合实践第五次个人作业 作业要求:在软件测试章节中,我们介绍了不少VSTS的软件测试工具,请使用一些其他平台上的测试工具,并写博客介绍如何在你的项目中具体使用. 前言:   第一次看到这个作业 ...

  5. 前端开发自动化工作流工具,JavaScript自动化构建工具grunt、gulp、webpack介绍

    前端开发自动化工作流工具,JavaScript自动化构建工具grunt.gulp.webpack介绍 前端自动化,这样的一个名词听起来非常的有吸引力,向往力.当今时代,前端工程师需要维护的代码变得及为 ...

  6. 痞子衡嵌入式:开启NXP-MCUBootUtility工具的HAB加密功能 - CST(中英双语)

    1 Reason for enabling HAB encryption function 为什么要开启HAB加密功能 NXP-MCUBootUtility is a tool designed fo ...

  7. 微信小程序开发——开发者工具中素材管理功能使用的注意事项

    为什么使用“素材管理”: 微信小程序环境中本地资源图片是无法通过 WXSS 获取的,可以使用网络图片,或者 base64,或者使用<image/>标签.. 当然,如果不想这么麻烦,你可能会 ...

  8. Android Studio 3.0 下载 使用新功能介绍

    谷歌2017发布会更新了挺多内容的,而且也发布了AndroidStudio3.0预览版,一些功能先睹为快.(英语一般,有些翻译不太好) 下载地址 https://developer.android.g ...

  9. 黄聪:Microsoft office 2013版下载、安装及破解工具下载破解教程(Windows Toolkit)

    Microsoft Office 2013(Office 15)是微软的新一代Office办公软件,全面采用Metro界面.Microsoft Office 2013官方下载(Office2013专业 ...

随机推荐

  1. mssql下调用dll

    1.新建类库,里面写入方法,类库里必须样静态,防止实例化 2.将dll存放到文件夹里 3.在sql中运行 EXEC sp_configure 'clr enabled' , '1'; --0代表不允许 ...

  2. XHR 对象实例所有的配置、属性、方法、回调和不可变值

    当我们声明了一个XMLHttpRequest对象的实例的时候,使用for-in来循环遍历一下这个实例(本文使用的是chrome45版本浏览器),我们会发现在这个实例上绑定了一些内容,我把这些内容进行了 ...

  3. JavaScript初探 四 (程序结构)

    JavaScript 结构 JavaScript 程序结构 JavaScript支持几乎和C语言一样的程序结构 分支结构 循环结构 分支结构 条件分支 if-else if语句:判断条件为true则执 ...

  4. SILK编码语音转WAV格式

    - SILK编码 SILK采样率可为8.12.16或24 kHz,比特率可为6至40 kbit/s.对应到报文层面的直观印象,即SILK编码的语音数据每帧长度是不等的. SILK编码已经开源,目前可下 ...

  5. ft6236 触摸屏驱动

    在目录下amp\a53_linux\drv\extdrv\touchpad\ft6236下可以看到ft6236.c的文件 1. init函数 static int __init ft_init(voi ...

  6. Appium左右、上下滑动(Java)

    网上很多文章都说用swipe来左右滑动,你把代码一贴,结果报错,看半天,原来是java-client中swipe早就被废除了!!!下面介绍一种Java写法来左右上下滑动: 首先,创建一个Swipe类 ...

  7. pyquery解析库

    这一篇整理一下pyquery这个解析库.还是菜,若有错误的地方,欢迎大家随时指正.......(come on.......) pyquery:是一个css选择器,再使用时,也需要传入HTML文本来初 ...

  8. 新建全色或者resize(毫无价值,只是做记录)

    import glob import os,sys import shutil import numpy as np import cv2 import matplotlib.pyplot as pl ...

  9. 第七周第二次Scrum会议

    工作: 根据上个周对前端的布置学习,布置大家开发了相应的界面.(界面开发成果写在测试报告) 地点: 二餐二 会议照片: 忘记拍了... 核心问题: 如何编写统一风格的前端界面. 解决: 将相应资源打包 ...

  10. LG1337 [JSOI2004]平衡点 / 吊打XXX 模拟退火

    问题描述 LG1337 题解 模拟退火模板 记住概率公式: \(exp(\frac{dealt}{T}) \times rand \ge R_A^ND^M_AX\) zzk太欧了,我交了一版没过他来了 ...