【问题标题】:Jmeter Cache Manager - null exceptionJmeter 缓存管理器 - 空异常
【发布时间】:2015-03-18 10:16:50
【问题描述】:

我创建了一个网络测试来模拟我将用于负载测试的浏览器行为。

版本:Jmeter 2.12

我的测试计划

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

如果我没有选中Use cache control/Expires header when processing GET requests,则没有问题。

当我勾选“使用缓存控制...”时出现很多错误?

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

这是正常行为吗?因为它们在缓存中,所以没有请求页面?然后我应该删除我的断言吗? (我使用响应断言,包含文本)我可以使用什么断言?

【问题讨论】:

    标签: performance testing jmeter load-testing


    【解决方案1】:

    这是 2.12 中的一个已知问题,已在 2.13 中修复。见:https://bz.apache.org/bugzilla/show_bug.cgi?id=57579

    如果您仍想使用 2.12 作为解决方法,您可以将此行添加到您的 jmeter.properties 文件中

    cache_manager.cached_resource_mode=RETURN_200_CACHE
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-28
      • 2019-10-02
      相关资源
      最近更新 更多