fix(测试计划): 修复测试计划获取没有步骤结果场景时不会处理报告记录的问题
修复测试计划获取没有步骤结果场景时不会处理报告记录的问题
This commit is contained in:
parent
75e678fc87
commit
08e27d3cc8
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue