Jmeter java协议测试jar和依赖jar的路径研究
昨天在使用2.12版本的jmeter时,执行多机负载测试一直报错,最终查明是使用不当的问题,现将详情记录如下,使用jmeter测试java协议脚本时要注意以下几点:
1. jar包的方式路径一定是这样,否则可能会出现诡异问题:
apache-jmeter
-- lib —— 脚本依赖的包放在这里
-- ext —— 自己开发脚本(jar文件)放在这里
2. jmeter/lib目录下本身有很多jar包,所以拷贝脚本依赖的jar时一定要小心,千万别和这些jmeter自带的重复,否则也会死的很难看!
附上官方白皮书:
JMeter automatically finds classes from jars in the following directories:
- JMETER_HOME/lib - used for utility jars
- JMETER_HOME/lib/ext - used for JMeter components and plugins
If you have developed new JMeter components, then you should jar them and copy the jar into JMeter's lib/ext directory. JMeter will automatically find JMeter components in any jars found here. Do not use lib/ext for utility jars or dependency jars used by the plugins; it is only intended for JMeter components and plugins.
If you don't want to put JMeter plugin jars in the lib/ext directory, then define the property search_paths in jmeter.properties.
Utility and dependency jars (libraries etc) can be placed in the lib directory.
If you don't want to put such jars in the lib directory, then define the property user.classpath or plugin_dependency_paths in jmeter.properties. See below for an explanation of the differences.
Other jars (such as JDBC, JMS implementations and any other support libaries needed by the JMeter code) should be placed in the lib directory - not the lib/extdirectory, or added to user.classpath .
Note: JMeter will only find .jar files, not .zip.
You can also install utility Jar files in $JAVA_HOME/jre/lib/ext, or you can set the property user.classpath in jmeter.properties
Note that setting the CLASSPATH environment variable will have no effect. This is because JMeter is started with "java -jar", and the java command silently ignores the CLASSPATH variable, and the -classpath/-cp options when -jar is used. [This occurs with all Java programs, not just JMeter.]
Jmeter java协议测试jar和依赖jar的路径研究的更多相关文章
- Jmeter java协议配置文件导入
一. 方法一 通过ClassLoader获取当前路径,想在java脚本里读取druid.properties,路径如下 apache-jmeter --bin --druid.properties 相 ...
- maven依赖本地非repository中的jar包-依赖jar包放在WEB-INF/lib等目录下的情况客户端编译出错的处理
MAVEN 今天在使用maven编译打包一个web应用的时候,碰到一个问题: 项目在开发是引入了依赖jar包,放在了WEB-INF/lib目录下,并通过buildpath中将web libariary ...
- java命令行执行带依赖jar包的main函数
有时候客户端没有运行环境,需要将程序放到服务器上执行,可按如下操作: 1.创建libs文件夹,将运行过程中依赖的jar包全部拷贝到此处; 2.编译.执行 javac -Djava.ext.dirs=l ...
- jmeter的dubbo压测,依赖jar包要放到执行机的lib/ext下
对于jmeter的dubbo压测场景的master-slave结构: 即master的jmeter进行任务的下发和报告的生成,slave进行任务的执行 因为dubbo压测需要依赖很多三方jar包,那么 ...
- JMeter 压测基础(四)——Java工程测试
JMeter Java工程测试 1.eclipse中新建工程 2.导入需要的jar包 从JMeter安装目录lib/ext中两个jar包buildPath到Java project中,分别是“Apac ...
- jmeter 测试java协议经验总结
对java协议的良好支持,是jmeter比loadrunner优秀的地方,但是坑也不少,本文将相关点都整理下来备忘 一. 依赖的jar包 使用IDE开发jemter java协议脚本时,需要导入以下几 ...
- Java ClassLoader基础及加载不同依赖 Jar 中的公共类
转载自:最新内容及最清晰格式请见 http://www.trinea.cn/android/java-loader-common-class/ 本文主要介绍 ClassLoader 的基础知识,Cla ...
- java打包/命令行方式运行jar(命令行进行程序测试)
public class Testtmp { public static void main(String[] args) { // TODO Auto-generated method stub f ...
- 自动配置pom文件,构建maven项目jar包依赖关系,找到jar包运用到jmeter
首先说下pom文件特别方便的优点: 什么是pom文件? POM(Project Object Model) 是Maven的基础. 它是一个XML文件,包含了Maven用来build项目所需要的项目配置 ...
随机推荐
- 利用Echarts设计一个图表平台(一)
Echarts是一款百度的开源图表库,里面提供了非常多的图表样式,我们今天要讲的内容是利用这一款开源js图表,制作一个能够动态定制的图表平台. 1)Echarts API介绍 首先我们先来看一下Ech ...
- linux 截取时间段的日志
sed -n '/14:[0-9][0-9]:[0-9][0-9]/p’ haproxy.log 截取14点的日志 cat haproxy.log-20160302 | grep xslh ...
- th:each
<tr th:each="user,userStat:${users}">userStat是状态变量,有 index,count,size,current,even,o ...
- PHP中使用Luhn算法校验信用卡及借记卡卡号
Luhn算法会通过校验码对一串数字进行验证,校验码通常会被加到这串数字的末尾处,从而得到一个完整的身份识别码. 我们以数字“7992739871”为例,计算其校验位: 从校验位开始,从右往左,偶数位乘 ...
- 好用的ssh工具oh-my-zsh / iterm2
The manual way 1. Clone the repository: git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh- ...
- slider jq小插件
html代码 <div class="r_list r_1" style="display:block;"> <div class=" ...
- CCNP第二天 帧中继综合实验
实验题如图所示: 要求全网可达 R5为帧中继交换机 R6 和 R1之间为快速以太网接口 所使用的拓扑为CCNA标准版拓扑图,如下所示: -------------------------------- ...
- RDD操作
RDD操作 1.对一个数据为{1,2,3,3}的RDD进行基本的RDD转化操作 函数名 目的 示例 结果 map() 函数应用于RDD中的每个元素 rdd.map(x=>x+1) {2,3,4, ...
- DB2中循环日期跑数据
1.数据库版本: 2.具体实现方式: ),)) /*************************************************************************** ...
- Linux网络通信编程(套接字模型TCP\UDP与IO多路复用模型select\poll\epoll)
Linux下测试代码: http://www.linuxhowtos.org/C_C++/socket.htm TCP模型 //TCPClient.c #include<string.h> ...