fix(接口自动化): 修复测试报告触发方式不展示问题

This commit is contained in:
fit2-zhao 2021-03-25 15:13:36 +08:00
parent e2ae033d87
commit 9f6e19928b
1 changed files with 4 additions and 1 deletions

View File

@ -269,7 +269,7 @@ public class ApiAutomationService {
}
private void deleteApiScenarioReport(List<String> scenarioIds) {
if(scenarioIds == null || scenarioIds.isEmpty()){
if (scenarioIds == null || scenarioIds.isEmpty()) {
return;
}
ApiScenarioReportExample scenarioReportExample = new ApiScenarioReportExample();
@ -371,6 +371,9 @@ public class ApiAutomationService {
public APIScenarioReportResult createScenarioReport(String id, String scenarioId, String scenarioName, String triggerMode, String execType, String projectId, String userID) {
APIScenarioReportResult report = new APIScenarioReportResult();
if (triggerMode.equals(ApiRunMode.SCENARIO.name()) || triggerMode.equals(ApiRunMode.DEFINITION.name())) {
triggerMode = ReportTriggerMode.MANUAL.name();
}
report.setId(id);
report.setTestId(id);
if (StringUtils.isNotEmpty(scenarioName)) {