自动化测试执行日志和操作日志功能
This commit is contained in:
@@ -120,8 +120,9 @@ public class TestTaskController extends BaseController {
|
||||
@PostMapping("/run")
|
||||
public AjaxResult run(@RequestBody IDQO qo) {
|
||||
// 异步执行任务
|
||||
String username = SecurityUtils.getUsername();
|
||||
CompletableFuture.runAsync(() -> {
|
||||
testTaskService.executeTestTaskById(qo.getId(), 2, null, jmeterHomePath, SecurityUtils.getUsername());
|
||||
testTaskService.executeTestTaskById(qo.getId(), 2, null, jmeterHomePath, username);
|
||||
});
|
||||
return toAjax(true);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class TestTaskLog extends BaseEntity
|
||||
private String operUser;
|
||||
|
||||
/** 操作时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date operTime;
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@ public class TestTaskResult extends BaseEntity
|
||||
private Long taskId;
|
||||
|
||||
/** 触发时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "触发时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "触发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date triggerTime;
|
||||
|
||||
/** 执行时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/** 触发方式:1-定时任务;2-手动 */
|
||||
|
||||
Reference in New Issue
Block a user