fix(测试计划): 修复测试计划生成报告时状态没更改的缺陷

This commit is contained in:
Jianguo-Genius 2024-05-20 10:21:17 +08:00 committed by 刘瑞斌
parent 66f4226f18
commit 27e442c6d4
1 changed files with 4 additions and 0 deletions

View File

@ -321,6 +321,10 @@ public class TestPlanReportService {
planReport.setPassRate(RateCalculateUtils.divWithPrecision((int) functionalCasePassCount, (int) caseTotal, 2));
// 计划的(执行)结果状态: 通过率 >= 阈值 ? 成功 : 失败
planReport.setResultStatus(planReport.getPassRate() >= planReport.getPassThreshold() ? ReportStatus.SUCCESS.name() : ReportStatus.ERROR.name());
planReport.setEndTime(System.currentTimeMillis());
testPlanReportMapper.updateByPrimaryKeySelective(planReport);
return planReport;
}