我正在开发一个Web项目,我想集成JMeter来运行一些负载测试.我正在按照这个简单的教程.我使用brew安装了JMeter.当我尝试运行JMeter时,我收到以下错误:无法找到Java可执行文件或版本.请检查您的Java安装.
以前我安装了最新版本的java(https://www.java.com/en/download/mac_download.jsp),我已经在https://java.com/en/download/installed.jsp上验证了它.我收到此消息"恭喜!您已安装推荐的Java(版本8更新91)." 但我无法运行JMeter.如何为运行配置Java或JMeter安装?
我是JMeter的新手.我正在尝试创建一个测试计划,其中一个请求是一个包含一些参数的POST请求,请求头中的内容类型是Multipart/Form-data.
我正在从fiddler复制头/参数,因为HTTP代理记录器不工作.
请查看我所拥有的当前设置的图像.我无法使用它获得所需的响应.
我有maven项目,在我的帮助下我试图执行一个jmx文件,运行JMeter(jmeter-maven-plugin).我有以下控制台输出
P E R F O R M A N C E T E S T S
[INFO] -------------------------------------------------------
[INFO] Invalid value detected for <postTestPauseInSeconds>. Setting pause to 0...
[INFO]
[INFO]
[INFO] Executing test: ZawyaJmeterTest.jmx
[INFO] Writing log file to: D:\tools\jmeter_examples\Example\jmeter-maven-example\target\jmeter\logs\ZawyaJmeterTest.jmx.log
[INFO] Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'D:\tools\jmeter_examples\Example\jmeter-maven-example\target\jmeter\testFiles\ZawyaJmeterTest.jmx', missing class com.thoughtworks.xstream.converters.ConversionException: No field 'sentBytes' found in class 'org.apache.jmeter.samplers.SampleSaveConfiguration' : No field 'sentBytes' found in class 'org.apache.jmeter.samplers.SampleSaveConfiguration'
Run Code Online (Sandbox Code Playgroud)
我想为了解决这个问题, org.apache.jmeter.samplers.SampleSaveConfiguration
我尝试在依赖项中添加SampleSaveConfiguration类
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_core</artifactId>
<version>3.1</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
但实际上并没有帮助.比我寻找问题No field 'sentBytes' …
我使用JMeter设置了分布式负载测试环境。我使用的三个Linux机器(红帽)(IPS: ,xxx.xxx.xxx.121
,xxx.xxx.xxx.122
)xxx.xxx.xxx.123
使用从我的Windows 8.1壳牌担保。
我已经满足执行分布式测试的先决条件:
Client(Master) Machine :xxx.xxx.xxx.123
Server(Slave) Machines: xxx.xxx.xxx.122,xxx.xxx.xxx.121
我做了以下工作:
1)在客户端(主)jmeter.properties文件中添加了以下内容:
remote_hosts= xxx.xxx.xxx.122,xxx.xxx.xxx.121
2)将以下内容添加到服务器(在每个从属计算机中)jmeter-server:
RMI_HOST_DEF=-Djava.rmi.server.hostname=xxx.xxx.xxx.123
(客户端计算机IP)
3)然后使用此命令从这两个从属机器(xxx.xxx.xxx.122,xxx.xxx.xxx.121)启动jmeter-server
./jmeter-server
并获得以下输出。这意味着从属计算机已启动。
xxx.xxx.xxx.121的输出:
Created remote object: UnicastServerRef [liveRef: [endpoint:[xxx.xxx.xxx.123:41864](local),objID:[1707296d:154c281318b:-7fff, -8101068266055605468]]]
Run Code Online (Sandbox Code Playgroud)
xxx.xxx.xxx.122的输出:
Using local port: 4000
Created remote object: UnicastServerRef [liveRef: [endpoint:[xxx.xxx.xxx.123:4000](local),objID:[-2a2acf13:154c285ffa2:-7fff, 2939294752655639469]]]
Run Code Online (Sandbox Code Playgroud)
现在,我从客户端计算机(xxx.xxx.xxx.123)运行以下命令以启动远程测试。
./jmeter -n -t RemoteTest.jmx -r
它为我提供了以下输出:
Creating summariser <summary>
Created the tree …
Run Code Online (Sandbox Code Playgroud) 请帮助我理解JMeter计算的吞吐量值如何:例如第一行的吞吐量,53.1/min
这个数字是如何由JMeter用哪个公式计算出来的.
此外,想知道后续测试中的吞吐量值如何分为分钟或秒.例如,第二行有吞吐量1.6/sec
,那么JMeter如何根据时间单位计算这个吞吐量值?
在网上尝试了很多网站并且得到了一个共同的答复,即吞吐量是在测试期间发送到服务器的每单位时间(秒,分钟,小时)的请求数.但这并不适用于我在图表中看到的直接解释的结果.
我创建了一个新的Repository(名为repoN)和现有的(名为repoE),只需复制分支中的代码(名为B22).
之后,我在repoN中创建了一个新分支(名为BR01).现在我在repoN存储库中存在的分支(名为BR01)中进行了一些更改.
我只想将所有这些更改带入旧的存储库repoE,而不会将BR01的历史记录丢失到B22中.
我正在使用SourceTree,因为我是Git的新手并且不太了解命令.
我想将woo Commerce数据库表中的数字四舍五入到2个小数点wp_postmeta
。有一个'meta_key'
包含row的列'_price'
和一个'meta_value'
包含各种数据的列以及该行'_price'
中需要四舍五入并减少到两位小数的数字。(我知道我也必须这样做_regular_price
)
我是SQL的完整入门者。通过使用Search给我语法或复制和更改网上找到的答案,我已经成功地在PHPMyAdmin中做了一些事情,但是这使我感到困惑,但还不够足够。
我设法通过此查询将所有价格都提高了10%-
update wp_postmeta set meta_value = meta_value * 1.10 where meta_key='_regular_price'
Run Code Online (Sandbox Code Playgroud)
我读过有一个“ ROUND”功能,但不确定如何编写查询。
我猜是这样的-
UPDATE wp_postmeta ROUND meta_value where meta_key='_price'
Run Code Online (Sandbox Code Playgroud)
希望这里有人能帮忙。
angular.module('project_tracker')
.config(['$locationProvider','$routeProvider','$provide',
'authProvider','jwtInterceptorProvider','$httpProvider',
function config($locationProvider, $routeProvider,$provide,
authProvider,jwtInterceptorProvider,$httpProvider){
authProvider.init({
domain: 'xxxxxxxxxxxxxx',
clientID: 'xxxxxxxxxxxxxx'
});
jwtInterceptorProvider.tokenGetter = function($localStorage){
return $localStorage.id_token;
}
$locationProvider.hashPrefix('!');
$routeProvider.
when('/projects_list',{
template: '<project-list></project-list>'
}).
when('/building_add',{
template: '<building-add></building-add>'
}).
when('/project_view/:projectId',{
template: '<project-view></project-view>'
}).
when('/project_add',{
template: '<project-add></project-add>'
}).
when('/project_update/:projectId',{
template: '<project-update></project-update>'
}).
when('/profile', {
template : '<profile></profile>',
})
function redirect($q,$injector,auth, $localStorage, $location){
return {
reponseError: function(rejection){
if(rejection.status === 401){
auth.signout();
delete $localStorage.profile;
delete $localStorage.id_token;
delete $localStorage.projects;
delete $localStorage.projects;
delete $localStorage.project_number;
$location.path('/home');
}
return $q.reject(rejection);
}
}
}
$provide.factory('redirect',redirect);
$httpProvider.interceptors.push('redirect');
$httpProvider.interceptors.push('jwtInterceptor');
} …
Run Code Online (Sandbox Code Playgroud)我从某人那里收到了一个JMeter脚本,这个脚本包含3个吞吐量控制器.奇怪的是,他们选择了"百分比执行"并将每个控制器的吞吐量加起来我只达到70(第一个吞吐量为40,第二个为20,第三个为10).问题是:
1.它们的总和不应该是100(100%)吗?
2.如果总和为70且第一个吞吐量为40,是否意味着第一个吞吐量控制器将运行70的总和的40%?
3.有人可以给我更多与"执行百分比与总执行次数"相关的详细信息吗?
-JMeter帮助没什么用.
我正在使用 JMeter 来测试我配置的 Apache2 服务器。我想测试服务器是否可以处理每秒总共出现的 200 个 HTTP 请求,并重复处理很长的秒数(例如 1 分钟,甚至更长)。我阅读了 JMeter 文档,但在理解计时器功能方面有点困难。我配置了测试
- Numbers of Threads 200
- Ramp-up period 1
- Loop Count 100
Run Code Online (Sandbox Code Playgroud)
现在,据我理解和注意到,JMeter的行为是尝试在1秒内提升200个线程,然后尽可能快地执行200*100=20000个请求(或者至少这是我的行为)在我的服务器上遇到),每次 200 个请求块。这意味着服务器可能(实际上确实)每秒接收超过 200 个请求。我想要重现的行为是每秒恰好有 200 个请求。我不在乎它们是否在第二个窗口开始时聚集在一起,或者它们以随机方式出现,分布在第二个窗口中(每 5 毫秒一个,或其他)。所以我尝试了一些定时器,但没有成功。我试过:
Constant Timer
线程延迟为 5 毫秒。计算一下,它应该每 5 毫秒发送一个请求,并且有 200 个线程,它应该每秒发送 200 个请求 (200*5 = 1000ms)。Constant Throughput Timer
目标吞吐量为 12000.0。也许我错了,但这应该是每分钟的样本,所以每 60 秒 200 个请求是 200*20 = 12000(如果样本是一个请求)。我不理解“计算吞吐量基于”选项,我尝试了“仅此线程”(哪一个?)和“所有活动线程”。无论如何,这些配置都没有达到我的需要。
我想使用JMeter中的BeanShell预处理器为事务控制器指定名称。我想在以后使用标头管理器连接并在dynaTrace中显示。
我使用BeanShell侦听器尝试过类似的操作
String test = sampleResult.getSampleLabel();
log.info(test);
Run Code Online (Sandbox Code Playgroud)
但是我想使用预处理器。
log.info(sampler.getName());
Run Code Online (Sandbox Code Playgroud)
这用于获取采样器的名称,就像我想要获取事务控制器的名称一样。
具体来说,我想使用BeanShell预处理器。
有人可以帮我吗?
我有个约会日期timestamp
.例如,我必须在7:00:00 hours
从时间戳日期开始的一天开始每天更换它.11-07-2016 7:00:00
例如,我在更改后有一个日期837072216 837241200
需要一个标量函数.
jmeter ×9
angularjs ×1
apache ×1
beanshell ×1
bitbucket ×1
decimal ×1
git ×1
github ×1
httprequest ×1
java ×1
load-testing ×1
macos ×1
maven ×1
mysql ×1
performance ×1
plugins ×1
post ×1
rounding ×1
sourcetree ×1
sql ×1
sql-server ×1
t-sql ×1
throughput ×1
timestamp ×1