refactor(接口自动化): 恢复本地执行方式

This commit is contained in:
fit2-zhao 2021-04-19 11:09:04 +08:00 committed by fit2-zhao
parent 42cc4de35d
commit c3777879bd
2 changed files with 6 additions and 6 deletions

View File

@ -880,8 +880,8 @@ public class ApiAutomationService {
// 调用执行方法
List<String> reportIds = new LinkedList<>();
HashTree hashTree = generateHashTree(apiScenarios, request, reportIds);
// jMeterService.runSerial(JSON.toJSONString(reportIds), hashTree, request.getReportId(), runMode, request.getConfig());
jMeterService.runTest(JSON.toJSONString(reportIds), hashTree, runMode, false, request.getConfig());
jMeterService.runSerial(JSON.toJSONString(reportIds), hashTree, request.getReportId(), runMode, request.getConfig());
// jMeterService.runTest(JSON.toJSONString(reportIds), hashTree, runMode, false, request.getConfig());
return request.getId();
}
@ -948,9 +948,9 @@ public class ApiAutomationService {
createScenarioReport(request.getId(), request.getScenarioId(), request.getScenarioName(), ReportTriggerMode.MANUAL.name(), request.getExecuteType(), request.getProjectId(),
SessionUtils.getUserId(), null);
// 调用执行方法
jMeterService.runTest(request.getId(), hashTree, ApiRunMode.SCENARIO.name(), true, null);
// jMeterService.runTest(request.getId(), hashTree, ApiRunMode.SCENARIO.name(), true, null);
// 调用执行方法
// jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), ApiRunMode.SCENARIO.name());
jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), ApiRunMode.SCENARIO.name());
return request.getId();
}

View File

@ -535,8 +535,8 @@ public class ApiDefinitionService {
runMode = ApiRunMode.API_PLAN.name();
}
// 调用执行方法
//jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), runMode);
jMeterService.runTest(request.getId(), hashTree, runMode, request.getReportId() != null, null);
jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), runMode);
//jMeterService.runTest(request.getId(), hashTree, runMode, request.getReportId() != null, null);
return request.getId();
}