fix(测试计划): 修复测试计划获取没有步骤结果场景时不会处理报告记录的问题

修复测试计划获取没有步骤结果场景时不会处理报告记录的问题
This commit is contained in:
song-tianyang 2021-12-18 02:40:21 +08:00 committed by song-tianyang
parent 75e678fc87
commit 08e27d3cc8
1 changed files with 0 additions and 7 deletions

View File

@ -580,14 +580,7 @@ public class ApiScenarioReportService {
private void counterPlanScenarioReport(TestResult result) { private void counterPlanScenarioReport(TestResult result) {
if (CollectionUtils.isEmpty(result.getScenarios()) && StringUtils.isNotEmpty(result.getTestId())) { if (CollectionUtils.isEmpty(result.getScenarios()) && StringUtils.isNotEmpty(result.getTestId())) {
List<String> list = new LinkedList<>();
try {
list = JSON.parseObject(result.getTestId(), List.class);
} catch (Exception e) {
list.add(result.getTestId());
}
ApiScenarioReport report = apiScenarioReportMapper.selectByPrimaryKey(result.getTestId()); ApiScenarioReport report = apiScenarioReportMapper.selectByPrimaryKey(result.getTestId());
if (report != null) { if (report != null) {
report.setStatus("Error"); report.setStatus("Error");
apiScenarioReportMapper.updateByPrimaryKey(report); apiScenarioReportMapper.updateByPrimaryKey(report);