【发布时间】:2014-04-09 17:28:46
【问题描述】:
我无法从 JMeter 中的 JDBC Sampler 获取结果集对象。 JMeter 文档准确地说明了这一点:
Result Variable Name
If specified, this will create an Object variable containing a list of
row maps. Each map contains the column name as the key and the column
data as the value.
Usage:
columnValue = vars.getObject("resultObject").get(0).get("Column Name");
所以,我这样配置它并且它可以工作。但是由于上面的文档说我创建了一个“行映射列表”,我想我会尝试在 BeanShell 中从它创建一个 List 对象以使其更具可读性。我试过这样做,但没有奏效。有人知道答案吗?
List<Map<String,Integer>> results = vars.getObject("resultList");
而且错误或多或少是这样的:
jmeter.util.BeanShellInterpreter: Error invoking bsh
method: eval In file: inline evaluation of:
``List<Map<String,Integer>> results = vars.getObject("resultList")
【问题讨论】:
标签: jmeter jmeter-plugins