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项目所需要的项目配置 ...
随机推荐
- 企业SAAS的春天,将以手机应用的形式,即将到来
派尔科技吴春福 *本文是派尔为什么要投身企业移动应用的内部分享文章: *我没有仔细核查资料,仅代表个人看法,思路也是在整理过程,逻辑未必很完整,看官将就着看. 企业SAAS,概念起源是N年前,先行者也 ...
- win7下64位系统memcache/memcached安装教程
折腾了1个多小时,终于搞定.操作系统时64位的,php5.3.13 类似于上一篇的xdebug安装教程~~ memcache和memcached的区别 在自己的新程序中打算全面应用memcached ...
- ASP.NET MVC3 使用kindeditor编辑器获取不到值
做开发真的是会遇到各种问题,如果不亲自尝试,不动手,很难发现问题. 下面我们说下在MVC中的用法 1,首先引入js文件 <script type="text/javascript&qu ...
- 九度OJ 1541 二叉树【数据结构】
题目地址:http://ac.jobdu.com/problem.php?pid=1541 题目描述: 旋转是二叉树的基本操作,我们可以对任意一个存在父亲节点的子节点进行旋转,包括如下几种形式(设被旋 ...
- ubuntu10.4 server 配置VPN 安装pptp无法连接外网解决(转)
链接:http://www.ppkj.net/2011/04/30/ubuntu10-4-server-%E5%AE%89%E8%A3%85pptp%E6%97%A0%E6%B3%95%E8%BF%9 ...
- json-lib-2.4.jar Bug,json字符串中value为"[value]"结构时,解析为数组,不会解析成字符串
使用json-lib.jar 2.4进行json字符串转换为对象时发现一个bug.贴下测试代码: <dependency> <groupId>net.sf.json-lib&l ...
- checkBox控件的CheckedChanged与CheckedStateChanged区别
Checked属性为bool类型,CheckState属性为枚举类型(CheckState.Checked.CheckState.Unchecked和CheckState.Indeterminate) ...
- spring-cloud-turbine
turbine主要用于聚合hystrix的监控数据 依赖pom <dependencyManagement> <dependencies> <dependency> ...
- centos 安装ecshop出现date错误
centos 安装ecshop 错误提示 Warning: date(): It is not safe to rely on the system's timezone settings. You ...
- putty 代理设置
代理分 http 和 socket 代理. IE Internet属性-> 连接 -> 局域网设置 普通HTTP代理 直接输入IP,端口 socket 代理 点高级 套接字设置 安装好P ...