用例编排功能优化
This commit is contained in:
@@ -17,6 +17,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* 用例Controller
|
||||
@@ -87,6 +88,10 @@ public class TestCaseController extends BaseController {
|
||||
@PostMapping("/run")
|
||||
public AjaxResult run(@RequestBody IDQO qo) {
|
||||
log.info("执行用例 id:{}, jmeterHomePath:{}", qo.getId(), jmeterHomePath);
|
||||
return success(testCaseService.executeTestCaseById(qo.getId(), jmeterHomePath));
|
||||
// 异步执行任务
|
||||
CompletableFuture.runAsync(() -> {
|
||||
testCaseService.executeTestCaseById(qo.getId(), jmeterHomePath);
|
||||
});
|
||||
return toAjax(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user