getproperty values passed from Thread Group 1 to Thread group2
Result from BeanShell assertion
步骤2-从线程组1,使用$ {__ setProperty(StateCodeProperty,$ {stateDetails})}将属性设置为数据库结果。
步骤3-使用beanshell断言通过get属性访问线程组2-字符串result =(vars.get(“ $ {__ property(StateCodeProperty)}”)));我需要有关如何分隔列并在api调用中使用它的帮助。 –
答案 0 :(得分:0)
无论如何,如果您想访问不同线程组中的数据库结果,那么您可以尝试在beanshell断言中执行类似的操作(虽然不确定)-
ArrayList results = ${__property(StateCodeProperty)}; //it should return the object as an arraylist
for (int i; i < results.size(); i++) {
if (results.get(i).get("statecode").equals("NY")) { //iterating the results, 'statecode' is the name of your 1st column, similarly you can do for 'State'
//Do your comparisons or whatever you like here
}
}