JMeter의 JDBC 샘플러에서 결과 세트 객체를 가져 오는 데 문제가 있습니다. JMeter 문서에 정확히 다음과 같이 나와 있습니다 :JMeter의 JDBC 샘플러에서 객체 결과 세트를 얻는 방법
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<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")
예, 분명히 아름답게 작동했습니다. 고맙습니다! – djangofan