String time = vars.get("Nowtime");
String today = vars.get("today");
String todayTime = vars.get("todayTime");
log.info(time);
log.info(today);
String root = "E:\\00-xxx\\result\\";
String reportPath = root + today + "\\" + todayTime;
File dir = new File(reportPath);
if (!dir.exists()) {
dir.mkdir();
}
String report = root + "\\Aggregate-Report-" + vars.get("Nowtime");
String jmeterPath = "E:\\00-xxx\\soft\\apache-jmeter-5.3\\bin\\jmeter.bat";
String cmd = jmeterPath + " -g " + report + ".jtl -o " + reportPath;
log.info(cmd);
log.info("Html Report Path is : [" + reportPath + "]");
try {
Runtime.getRuntime().exec(cmd);
} catch (Exception e) {
log.error(e.getMessage());
}
原文地址:https://www.cnblogs.com/blog-ice/p/15703413.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。