fix(测试计划): 补充异常报告查看详情提示

This commit is contained in:
song-cc-rock 2024-06-17 19:11:36 +08:00 committed by Craftsman
parent f6a672db64
commit 4bc046cf80
5 changed files with 9 additions and 1 deletions

View File

@ -105,6 +105,7 @@ test_plan.error=测试计划不合法
test_plan_group.batch.log={0}测试计划组
test_plan.batch.log={0}测试计划
test_plan_report_not_exist=测试计划报告不存在
test_plan_report_detail_not_exist=异常报告, 报告汇总失败!
test_plan_report_id.not_blank=测试计划报告id不能为空
test_plan_report_name.not_blank=测试计划报告名称不能为空
test_plan_not_exist=测试计划不存在

View File

@ -107,6 +107,7 @@ test_plan.error=Test plan error
test_plan_group.batch.log={0} test plan group
test_plan.batch.log={0} plan
test_plan_report_not_exist=The test plan report does not exist
test_plan_report_detail_not_exist=Exception report. Report summary failed!
test_plan_report_id.not_blank=The test plan report id cannot be empty
test_plan_report_name.not_blank=The test plan report name cannot be empty
run_functional_case=Run functional case

View File

@ -107,6 +107,7 @@ test_plan.error=测试计划不合法
test_plan_group.batch.log={0}测试计划组
test_plan.batch.log={0}测试计划
test_plan_report_not_exist=测试计划报告不存在
test_plan_report_detail_not_exist=异常报告, 报告汇总失败!
test_plan_report_id.not_blank=测试计划报告id不能为空
test_plan_report_name.not_blank=测试计划报告名称不能为空
run_functional_case=执行功能用例

View File

@ -106,6 +106,7 @@ test_plan.error=測試計劃不合法
test_plan_group.batch.log={0}測試計劃組
test_plan.batch.log={0}測試計劃
test_plan_report_not_exist=測試計劃報告不存在
test_plan_report_detail_not_exist=異常報告, 報告彙總失敗!
test_plan_report_id.not_blank=測試計劃報告id不能爲空
test_plan_report_name.not_blank=測試計劃報告名稱不能爲空
run_functional_case=執行功能用例

View File

@ -514,7 +514,11 @@ public class TestPlanReportService {
TestPlanReport planReport = checkReport(reportId);
TestPlanReportSummaryExample example = new TestPlanReportSummaryExample();
example.createCriteria().andTestPlanReportIdEqualTo(reportId);
TestPlanReportSummary reportSummary = testPlanReportSummaryMapper.selectByExampleWithBLOBs(example).get(0);
List<TestPlanReportSummary> testPlanReportSummaries = testPlanReportSummaryMapper.selectByExampleWithBLOBs(example);
if (CollectionUtils.isEmpty(testPlanReportSummaries)) {
throw new MSException(Translator.get("test_plan_report_detail_not_exist"));
}
TestPlanReportSummary reportSummary = testPlanReportSummaries.get(0);
TestPlanReportDetailResponse planReportDetail = new TestPlanReportDetailResponse();
BeanUtils.copyBean(planReportDetail, planReport);
int caseTotal = (int) (reportSummary.getFunctionalCaseCount() + reportSummary.getApiCaseCount() + reportSummary.getApiScenarioCount());