jmeter保存返回数据到csv
添加一个线程组,然后右键选择“正则表达式提取器”
配置正则表达式:
添加添加后置处理器beanshell postprocessor:
保存提取的数据:
代码:
FileWriter fstream = new FileWriter("C:\\Users\\admin\\Desktop\\tokens.csv",true); BufferedWriter out = new BufferedWriter(fstream); out.write(vars.get("tokens")+","); out.write(System.getProperty("line.separator")); out.close(); fstream.close();