简体   繁体   English

Jmeter缓存管理器-空异常

[英]Jmeter Cache Manager - null exception

I have created a web test for simulating a browser behavior that I will use for load test. 我已经创建了一个网络测试,用于模拟将用于负载测试的浏览器行为。

Version: Jmeter 2.12 版本:Jmeter 2.12

My Test plan 我的测试计划

HTTP Request Defaults
Ultimate Thread Group 
-HTTP Cache Manager     
-HTTP Cookie Manager    
-Once Only Controller    
Login function    
-Random Controller   
 Random Http requests    
 Response Assertions

If I have Use cache control/Expires header when processing GET requests unchecked there are no problems. 如果Use cache control/Expires header when processing GET requests未选中Use cache control/Expires header when processing GET requests具有“ Use cache control/Expires header when processing GET requests则没有问题。

When I tick "Use cache control..." I get a lot of errors? 当我勾选“使用缓存控制...”时,出现很多错误吗?

Sampler request:
Thread Name: jp@gc - Ultimate Thread Group 1-5
Sample Start: 1970-01-01 01:00:00 CET
Load time: 0
Latency: 0
Size in bytes: 418
Headers size in bytes: 0
Body size in bytes: 418
Sample Count: 1
Error Count: 1
Response code: Non HTTP response code: java.lang.NullPointerException
Response message: Non HTTP response message: null

Response headers:
HTTPSampleResult fields:
ContentType: 
DataEncoding: null
Request 
Null

Is this the normal behavior? 这是正常现象吗? Are thh pages not requested since they are in cache? 因为页面在缓存中,所以不请求这些页面吗? Should I then remove my assertions? 然后应该删除我的断言吗? (I use response assertion, contain text) What assertion could I use? (我使用响应断言,包含文本)我可以使用什么断言?

This is a known issue in 2.12, that was fixed in 2.13. 这是2.12中的一个已知问题,已在2.13中修复。 See: https://bz.apache.org/bugzilla/show_bug.cgi?id=57579 请参阅: https//bz.apache.org/bugzilla/show_bug.cgi?id = 57579

If you want to still use, 2.12, as a workaround you can add this line to your jmeter.properties file 如果您仍想使用2.12作为解决方法,可以将此行添加到jmeter.properties文件中

cache_manager.cached_resource_mode=RETURN_200_CACHE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Jmeter中为多个用户使用缓存管理器 - How to use cache manager for multiple users in Jmeter JMeter Cookie管理器无法正常工作 - JMeter Cookie Manager not working Jmeter Cookie管理器仅提供部分数据 - Jmeter cookie manager gives only partial data jmeter 缓存在下一次迭代中没有清除 - jmeter cache doesn't clear in the next iteration Jmeter 性能:EXCEPTION_ACCESS_VIOLATION - Jmeter perfmon :EXCEPTION_ACCESS_VIOLATION VSTS中的JMeter脚本执行时,连接被拒绝例外 - Connection refused exception on JMeter Script Execution in VSTS 如何用参数将jmeter请求中的json值从“ null”替换为null? - how to replace json values from “null” to null in jmeter request with parameters? Jmeter-如何使用缓存加载多个用户的测试Ajax Web应用程序 - Jmeter - How to load test ajax web applications by multiple users with cache 我不能在同一个测试用例的 JMeter 授权管理器上使用多个凭据 - I cant use multiple credentials on JMeter Authorization Manager on the same Test Case 在 Jmeter API 测试中,我希望一个 http 采样器使用它自己的 header 经理,而测试计划中的其他 http 采样器使用一个通用的 header 经理 - In Jmeter API Testing,i want one http sampler to use header manager of its own and other http sampler in Test plan to use a common header manager
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM