1. 获取接口的执行时间
String ctime = prev.getTime().toString();
2. String转int
int c = Integer.parseInt(ctime);
3. 获取接口的请求data部分
String req_data = prev.queryString
4. jmeter后置处理器,文件写入本地,用于帅选参数化数据
String filename = “本地绝对路径”;
FileWriter writer;
writer = new FileWriter(filename,tue);
if(判断){
prev.setSuccessful(true);
writer.weite(“${参数化数据}”)
writer.write("\r\n");
writer.close();
}
else{
prev.setsuccessful(false);
writer.close();
}
标签:231106,jmeter,String,随笔,writer,filename,close,prev From: https://www.cnblogs.com/wanggfIT/p/17812066.html