我有一个脚本,可以在2.8版本的jmeter中完美地工作(打开和运行).我刚刚下载了Jmeter 2.9,我无法打开这个脚本.
我在日志文件中收到以下错误,我似乎不明白DummySampler的问题是什么,它似乎是根据日志的错误来源.我检查了2.9版本更改日志页面http://jmeter.apache.org/changes.html并且没有找到任何相关内容.
我是Jmeter和Java的新手,感谢任何帮助!
2013/08/05 17:12:29 INFO - jmeter.save.SaveService: All converter versions present and correct
2013/08/05 17:12:30 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: kg.apc.jmeter.samplers.DummySampler : kg.apc.jmeter.samplers.DummySampler
---- Debugging information ----
message : kg.apc.jmeter.samplers.DummySampler
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : kg.apc.jmeter.samplers.DummySampler
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.converters.HashTreeConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree[7]/hashTree[6]/kg.apc.jmeter.samplers.DummySampler
line number : 416
------------------------------- : kg.apc.jmeter.samplers.DummySampler : kg.apc.jmeter.samplers.DummySampler
---- Debugging information ----
message : kg.apc.jmeter.samplers.DummySampler
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : kg.apc.jmeter.samplers.DummySampler
class : org.apache.jorphan.collections.ListedHashTree
required-type : …Run Code Online (Sandbox Code Playgroud) // I had previously used a CSS/JQuery extractor to get a URL from a page and add it to JMeter vars - accessing it here
var pageURL = "${valueFromJmeterVars}";
// navigate to that url
WDS.browser.get(pageURL);
// selecting an element
var button = wait.until(pkg.ExpectedConditions.visibilityOfElementLocated(pkg.By.cssSelector(buttonLocator)));
// log desired boolean value to console, so I can confirm is as expected
WDS.log.info('reserveASpotButton:' + reserveASpotButton.isEnabled());
// add my boolean to JMeter vars, so I can access later from beanshell post-processor (where I do my assertions) …Run Code Online (Sandbox Code Playgroud) 如何为每次运行生成单独的.jtl结果文件.以下是我使用jenkins job(性能趋势插件)运行的命令.
cd /apache-jmeter-2.13/bin ./jmeter.sh -n -t /jmxFiles/Jbpm6Rest3Jenkins1.jmx -l /jmxFiles/SIP.jtl -JUSERS = $ {USER_COUNT} -JRampUp = $ {RAMP_UP} -JLoopCount = $ {} LOOP_COUNT
目前,SIP.jtl文件在每次运行时将结果附加到同一文件中.
如何为每次运行(SIP1,SIP2,SIP3等)生成单独的.jtl结果文件,并应显示在Jenkins性能趋势中.
jmeter performance-testing jenkins jenkins-plugins jmeter-plugins
我的测试计划(不工作):
+ WebSocket Sampler
- Regular Expression Extractor
Run Code Online (Sandbox Code Playgroud)
我的正则表达式:
回复数据:
[Message 1]
0{"sid":"1BdTy3e4-jfrVM67AAAR","upgrades":[],"pingInterval":25000,"pingTimeout":60000}
Run Code Online (Sandbox Code Playgroud)
怎么得到'sid'?
我使用 RESTful API 测试服务,这些方法接收带有二进制数据的 POST 请求。我使用 JMeter 进行测试。但我用这个工具提出这样的请求时遇到了麻烦。
我使用 BeanShell Sampler 制作二进制数据并将其放入变量中
import java.util.Base64;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.codec.binary.Base64;
String base64Str="Some string";
//Encode the string
byte[] bytes = Base64.encodeBase64(base64Str.getBytes());
vars.putObject("bytes", bytes);
Run Code Online (Sandbox Code Playgroud)
然后是 HTTP 请求,我将其放入主体数据中${bytes},以便使其从变量中读取原始字节并在 POST 请求中发送。但后来我得到一个异常“java.lang.ClassCastException:[B无法转换为java.lang.String”,这意味着在Body Data中给定的变量bytes被转换为字符串。相当相似的问题是使用 JMeter 发送带有二进制正文的 HTTP 请求,但在注释中对字符串转换做出了相同的结论。也许可以通过发送带有请求的文件来完成?
有一个插件 HTTP Raw Request,但我找不到将请求发送到具体 API 方法的方法,而该插件只有端口字段(也许在端口后面写一个方法路径?),并且我找不到传递的方法字节到它。
有谁知道在 JMeter 中解码 Base 64 格式字符串的解决方案?
我必须解码响应,但我不想重新发明轮子......
我必须自己编写代码吗(希望不是)?
谢谢
我正在分布式模式下运行jmeter,以对 300 个用户进行测试,但也无法从具有 1 个用户的主侦听器上的从站接收到任何响应。
关键点:
subnetserver.bat正在从属设备上运行1099我正在尝试从我的 JMeter 测试计划中获取 HTML 报告。不幸的是,始终显示以下错误。
File '/Users/roradhak/Cisco/GET/PPS-Proxy-Performance/Graph2_CSV.csv' does not contain the field names header, ensure the jmeter.save.saveservice.* properties are the same as when the CSV file was created or the file may be read incorrectly
Run Code Online (Sandbox Code Playgroud)
事实上,我尝试按照Jmeter 3.0 中解释的所有设置更改无法生成 ANT HTML 报告和其他链接。有人可以对此有所了解吗?
请在你说这在堆栈溢出时被问到之前,我已经查看了每一个答案,但没有一个作为解决方案起作用。
无论我做什么 HTTPS 网站都无法使用 JMeter 记录器。
使用 FireFox 63.03 使用 JMeter 5.0 Mac OS
这是我的步骤:(https://www.youtube.com/watch?v=amEHuq8auTU)
1). Create New Test Plan
2). Added a thread group
3). Added HTTP(S) recorder
4). Using port 8282 (tried 8080 earlier so trying others)
5). redirect automatically, follow redirects checked
6). Select HTTPS test script recorder for target controller
7) Add the HTTPS site (without the https)
8). Click Start
9). Getting prompted that ApacheJMeterTemporaryRootCA.crt is created
10. Triple checked that all previous …Run Code Online (Sandbox Code Playgroud) 我想通过代码对一些远程 API 调用进行基准测试。到目前为止,我一直在使用 JMH,但它不太适合我作为压力测试工具的需要(JMH 适用于微基准测试,其中作为基准测试的片段运行速度非常快)。我的远程 API 在几十秒内响应,所以我真的需要运行测试:
我可以通过 JMeter UI 中的手动测试实现很多目标,但我想编写一些使用 JMeter 并执行相同操作的 Java 测试/基准测试。有没有办法做到这一点?
jmeter ×10
jmeter-plugins ×10
base64 ×1
decode ×1
javascript ×1
jenkins ×1
jmeter-4.0 ×1
regex ×1
ssl ×1
webdriver ×1