小编run*_*sun的帖子

jmeter Beanshell PostProcessor删除标头抛出异常

当我使用 BeanShell PostProcessor 删除 header\xef\xbc\x8c 时,出现问题\n我的代码:

\n\n
\nimport org.apache.jmeter.protocol.http.control.Header; \n\nsampler.getHeaderManager().removeHeaderNamed("Authorization");\n
Run Code Online (Sandbox Code Playgroud)\n\n

例外:

\n\n
\n2017/05/18 15:24:52 ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval   Sourced file: inline evaluation of: ``import org.apache.jmeter.protocol.http.control.Header;   sampler.getHeaderManage . . . \'\' : Attempt to resolve method: getHeaderManager() on undefined variable or class name: sampler \n\n2017/05/18 15:24:52 WARN  - jmeter.extractor.BeanShellPostProcessor: Problem in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval   Sourced file: inline evaluation of: ``import org.apache.jmeter.protocol.http.control.Header;   sampler.getHeaderManage . . . \'\' : Attempt to resolve method: …
Run Code Online (Sandbox Code Playgroud)

testing jmeter

0
推荐指数
1
解决办法
1748
查看次数

标签 统计

jmeter ×1

testing ×1