fix(测试跟踪): 测试计划报告列表通过率计算有误
--bug=1016639 --user=陈建星 【测试跟踪】整体执行测试计划后,测试跟踪 - 报告列表,显示的报告成功率不对 https://www.tapd.cn/55049933/s/1240095
This commit is contained in:
parent
c95204c94b
commit
fc822112b5
|
@ -216,16 +216,14 @@ public class TestPlanReportService {
|
||||||
TestPlanUtils.buildStatusResultMap(planReportCaseDTOS, statusResultMap, report, TestPlanLoadCaseStatus.success.name());
|
TestPlanUtils.buildStatusResultMap(planReportCaseDTOS, statusResultMap, report, TestPlanLoadCaseStatus.success.name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
report.setExecuteRate(0.0);
|
||||||
|
report.setPassRate(0.0);
|
||||||
|
|
||||||
// 设置成功率
|
// 设置成功率
|
||||||
if (report.getCaseCount() != null && report.getCaseCount() != 0 && report.getExecuteCount() != 0) {
|
if (report.getCaseCount() != null && report.getCaseCount() != 0) {
|
||||||
report.setExecuteRate(report.getExecuteCount() * 0.1 * 10 / report.getCaseCount());
|
report.setExecuteRate(report.getExecuteCount() * 1.0 / report.getCaseCount());
|
||||||
} else {
|
report.setPassRate(report.getPassCount() * 1.0 / report.getCaseCount());
|
||||||
report.setExecuteRate(0.0);
|
|
||||||
}
|
|
||||||
if (report.getPassCount() != 0 && report.getCaseCount() != null && report.getExecuteCount() != 0) {
|
|
||||||
report.setPassRate(report.getPassCount() * 0.1 * 10 / report.getExecuteCount());
|
|
||||||
} else {
|
|
||||||
report.setPassRate(0.0);
|
|
||||||
}
|
}
|
||||||
testPlanReportDTO.setPassRate(report.getPassRate());
|
testPlanReportDTO.setPassRate(report.getPassRate());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue