diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java index 7c00ff765c..8ec808f47c 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java @@ -29,8 +29,6 @@ public class ApiDefinitionExecResultService { public void saveApiResult(TestResult result, String type) { result.getScenarios().get(0).getRequestResults().forEach(item -> { - // 清理原始资源,每个执行 保留一条结果 - extApiDefinitionExecResultMapper.deleteByResourceId(item.getName()); ApiDefinitionExecResult saveResult = new ApiDefinitionExecResult(); saveResult.setId(UUID.randomUUID().toString()); saveResult.setCreateTime(System.currentTimeMillis()); diff --git a/backend/src/main/java/io/metersphere/track/Factory/ReportComponentFactory.java b/backend/src/main/java/io/metersphere/track/Factory/ReportComponentFactory.java index cf0f0e83a7..537396745e 100644 --- a/backend/src/main/java/io/metersphere/track/Factory/ReportComponentFactory.java +++ b/backend/src/main/java/io/metersphere/track/Factory/ReportComponentFactory.java @@ -15,9 +15,11 @@ public class ReportComponentFactory { } else if (StringUtils.equals("2", componentId)) { return new ReportResultComponent(testPlan); } else if (StringUtils.equals("3", componentId)) { - return new ReportResultChartComponent(testPlan); + return new ReportResultAdvancedChartComponent(testPlan); +// return new ReportResultChartComponent(testPlan); } else if (StringUtils.equals("4", componentId)) { - return new ReportFailureResultComponent(testPlan); +// return new ReportFailureResultComponent(testPlan); + return new ReportFailureAdvanceResultComponent(testPlan); } return null; } diff --git a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java index 5730ace884..b5240048a6 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java @@ -113,6 +113,11 @@ public class TestPlanController { return testPlanService.getMetric(planId); } + @GetMapping("/get/statistics/metric/{planId}") + public TestCaseReportMetricDTO getStatisticsMetric(@PathVariable String planId) { + return testPlanService.getStatisticsMetric(planId); + } + @GetMapping("/project/name/{planId}") public String getProjectNameByPlanId(@PathVariable String planId) { return testPlanService.getProjectNameByPlanId(planId); diff --git a/backend/src/main/java/io/metersphere/track/domain/ReportComponent.java b/backend/src/main/java/io/metersphere/track/domain/ReportComponent.java index 22677500d3..8f734dfa3d 100644 --- a/backend/src/main/java/io/metersphere/track/domain/ReportComponent.java +++ b/backend/src/main/java/io/metersphere/track/domain/ReportComponent.java @@ -1,8 +1,12 @@ package io.metersphere.track.domain; +import io.metersphere.api.dto.automation.ApiScenarioDTO; +import io.metersphere.api.dto.definition.TestPlanApiCaseDTO; +import io.metersphere.commons.constants.APITestStatus; import io.metersphere.track.dto.TestCaseReportMetricDTO; import io.metersphere.track.dto.TestPlanCaseDTO; import io.metersphere.track.dto.TestPlanDTO; +import org.apache.commons.lang3.StringUtils; public abstract class ReportComponent { protected String componentId; @@ -15,4 +19,11 @@ public abstract class ReportComponent { public abstract void readRecord(TestPlanCaseDTO testCase); public abstract void afterBuild(TestCaseReportMetricDTO testCaseReportMetric); + + public void readRecord(TestPlanApiCaseDTO testCase) { + } + + public void readRecord(ApiScenarioDTO testCase) { + } + } diff --git a/backend/src/main/java/io/metersphere/track/domain/ReportFailureAdvanceResultComponent.java b/backend/src/main/java/io/metersphere/track/domain/ReportFailureAdvanceResultComponent.java new file mode 100644 index 0000000000..180f2c0001 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/domain/ReportFailureAdvanceResultComponent.java @@ -0,0 +1,55 @@ +package io.metersphere.track.domain; + +import io.metersphere.api.dto.automation.ApiScenarioDTO; +import io.metersphere.api.dto.automation.ScenarioStatus; +import io.metersphere.api.dto.definition.TestPlanApiCaseDTO; +import io.metersphere.commons.constants.TestPlanTestCaseStatus; +import io.metersphere.track.dto.FailureTestCasesAdvanceDTO; +import io.metersphere.track.dto.TestCaseReportMetricDTO; +import io.metersphere.track.dto.TestPlanCaseDTO; +import io.metersphere.track.dto.TestPlanDTO; +import org.apache.commons.lang3.StringUtils; + +import java.util.ArrayList; +import java.util.List; + +public class ReportFailureAdvanceResultComponent extends ReportComponent { + private List functionalTestCases = new ArrayList<>(); + private List apiTestCases = new ArrayList<>(); + private List scenarioTestCases = new ArrayList<>(); + + public ReportFailureAdvanceResultComponent(TestPlanDTO testPlan) { + super(testPlan); + componentId = "4"; + } + + @Override + public void readRecord(TestPlanCaseDTO testCase) { + if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Failure.name())) { + this.functionalTestCases.add(testCase); + } + } + + @Override + public void readRecord(TestPlanApiCaseDTO testCase) { + if (StringUtils.equals(testCase.getExecResult(), "error")) { + this.apiTestCases.add(testCase); + } + } + + @Override + public void readRecord(ApiScenarioDTO testCase) { + if (StringUtils.equals(testCase.getLastResult(), ScenarioStatus.Fail.name())) { + this.scenarioTestCases.add(testCase); + } + } + + @Override + public void afterBuild(TestCaseReportMetricDTO testCaseReportMetric) { + FailureTestCasesAdvanceDTO failureTestCasesAdvanceDTO = new FailureTestCasesAdvanceDTO(); + failureTestCasesAdvanceDTO.setFunctionalTestCases(functionalTestCases); + failureTestCasesAdvanceDTO.setApiTestCases(apiTestCases); + failureTestCasesAdvanceDTO.setScenarioTestCases(scenarioTestCases); + testCaseReportMetric.setFailureTestCases(failureTestCasesAdvanceDTO); + } +} diff --git a/backend/src/main/java/io/metersphere/track/domain/ReportFailureResultComponent.java b/backend/src/main/java/io/metersphere/track/domain/ReportFailureResultComponent.java index 469575717c..50595c824a 100644 --- a/backend/src/main/java/io/metersphere/track/domain/ReportFailureResultComponent.java +++ b/backend/src/main/java/io/metersphere/track/domain/ReportFailureResultComponent.java @@ -26,6 +26,6 @@ public class ReportFailureResultComponent extends ReportComponent { @Override public void afterBuild(TestCaseReportMetricDTO testCaseReportMetric) { - testCaseReportMetric.setFailureTestCases(failureTestCases); +// testCaseReportMetric.setFailureTestCases(failureTestCases); } } diff --git a/backend/src/main/java/io/metersphere/track/domain/ReportResultAdvancedChartComponent.java b/backend/src/main/java/io/metersphere/track/domain/ReportResultAdvancedChartComponent.java new file mode 100644 index 0000000000..3c465d9079 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/domain/ReportResultAdvancedChartComponent.java @@ -0,0 +1,109 @@ +package io.metersphere.track.domain; + +import io.metersphere.api.dto.automation.ApiScenarioDTO; +import io.metersphere.api.dto.automation.ScenarioStatus; +import io.metersphere.api.dto.definition.TestPlanApiCaseDTO; +import io.metersphere.commons.constants.TestPlanTestCaseStatus; +import io.metersphere.track.dto.*; +import org.apache.commons.lang3.StringUtils; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ReportResultAdvancedChartComponent extends ReportComponent { + Map functionalStatusResultMap = new HashMap<>(); + Map apiStatusResultMap = new HashMap<>(); + Map scenarioStatusResultMap = new HashMap<>(); + + private static Map apiResultMap = new HashMap<>(); + private static Map scenarioResultMap = new HashMap<>(); + + static { + apiResultMap.put("success", TestPlanTestCaseStatus.Pass.name()); + apiResultMap.put("error", TestPlanTestCaseStatus.Failure.name()); + scenarioResultMap.put(ScenarioStatus.Success.name(), TestPlanTestCaseStatus.Pass.name()); + scenarioResultMap.put(ScenarioStatus.Fail.name(), TestPlanTestCaseStatus.Failure.name()); + } + + public ReportResultAdvancedChartComponent(TestPlanDTO testPlan) { + super(testPlan); + componentId = "3"; + } + + @Override + public void readRecord(TestPlanCaseDTO testCase) { + getStatusResultMap(functionalStatusResultMap, testCase.getStatus()); + } + + @Override + public void readRecord(TestPlanApiCaseDTO testCase) { + getStatusResultMap(apiStatusResultMap, apiResultMap.get(testCase.getExecResult())); + } + + @Override + public void readRecord(ApiScenarioDTO testCase) { + getStatusResultMap(scenarioStatusResultMap, scenarioResultMap.get(testCase.getLastResult())); + } + + @Override + public void afterBuild(TestCaseReportMetricDTO testCaseReportMetric) { + testCaseReportMetric.setExecuteResult(getReportStatusResult()); + } + + private TestCaseReportAdvanceStatusResultDTO getReportStatusResult() { + TestCaseReportAdvanceStatusResultDTO reportStatusResult = new TestCaseReportAdvanceStatusResultDTO(); + buildFunctionalStatusResult(reportStatusResult); + buildApiStatusResult(reportStatusResult); + buildScenarioStatusResult(reportStatusResult); + return reportStatusResult; + } + + private void buildFunctionalStatusResult(TestCaseReportAdvanceStatusResultDTO reportStatusResult) { + List functionalStatusResult = new ArrayList<>(); + addToReportStatusResultList(functionalStatusResultMap, functionalStatusResult, TestPlanTestCaseStatus.Pass.name()); + addToReportStatusResultList(functionalStatusResultMap, functionalStatusResult, TestPlanTestCaseStatus.Failure.name()); + addToReportStatusResultList(functionalStatusResultMap, functionalStatusResult, TestPlanTestCaseStatus.Blocking.name()); + addToReportStatusResultList(functionalStatusResultMap, functionalStatusResult, TestPlanTestCaseStatus.Skip.name()); + addToReportStatusResultList(functionalStatusResultMap, functionalStatusResult, TestPlanTestCaseStatus.Underway.name()); + addToReportStatusResultList(functionalStatusResultMap, functionalStatusResult, TestPlanTestCaseStatus.Prepare.name()); + reportStatusResult.setFunctionalResult(functionalStatusResult); + } + + private void buildApiStatusResult(TestCaseReportAdvanceStatusResultDTO reportStatusResult) { + List apiStatusResult = new ArrayList<>(); + addToReportStatusResultList(apiStatusResultMap, apiStatusResult, TestPlanTestCaseStatus.Pass.name()); + addToReportStatusResultList(apiStatusResultMap, apiStatusResult, TestPlanTestCaseStatus.Failure.name()); + addToReportStatusResultList(apiStatusResultMap, apiStatusResult, TestPlanTestCaseStatus.Underway.name()); + reportStatusResult.setApiResult(apiStatusResult); + } + + private void buildScenarioStatusResult(TestCaseReportAdvanceStatusResultDTO reportStatusResult) { + List scenarioStatusResult = new ArrayList<>(); + addToReportStatusResultList(scenarioStatusResultMap, scenarioStatusResult, TestPlanTestCaseStatus.Pass.name()); + addToReportStatusResultList(scenarioStatusResultMap, scenarioStatusResult, TestPlanTestCaseStatus.Failure.name()); + addToReportStatusResultList(scenarioStatusResultMap, scenarioStatusResult, TestPlanTestCaseStatus.Underway.name()); + reportStatusResult.setScenarioResult(scenarioStatusResult); + } + + private void addToReportStatusResultList(Map resultMap, List reportStatusResultList, String status) { + if (resultMap.get(status) != null) { + reportStatusResultList.add(resultMap.get(status)); + } + } + + private void getStatusResultMap(Map reportStatusResultMap, String result) { + if (StringUtils.isBlank(result)) { + result = TestPlanTestCaseStatus.Underway.name(); + } + TestCaseReportStatusResultDTO statusResult = reportStatusResultMap.get(result); + if (statusResult == null) { + statusResult = new TestCaseReportStatusResultDTO(); + statusResult.setStatus(result); + statusResult.setCount(0); + } + statusResult.setCount(statusResult.getCount() + 1); + reportStatusResultMap.put(result, statusResult); + } +} diff --git a/backend/src/main/java/io/metersphere/track/domain/ReportResultChartComponent.java b/backend/src/main/java/io/metersphere/track/domain/ReportResultChartComponent.java index 1a0817ce65..778182938c 100644 --- a/backend/src/main/java/io/metersphere/track/domain/ReportResultChartComponent.java +++ b/backend/src/main/java/io/metersphere/track/domain/ReportResultChartComponent.java @@ -27,7 +27,7 @@ public class ReportResultChartComponent extends ReportComponent { @Override public void afterBuild(TestCaseReportMetricDTO testCaseReportMetric) { - testCaseReportMetric.setExecuteResult(getReportStatusResult()); +// testCaseReportMetric.setExecuteResult(getReportStatusResult()); } private List getReportStatusResult() { diff --git a/backend/src/main/java/io/metersphere/track/dto/FailureTestCasesAdvanceDTO.java b/backend/src/main/java/io/metersphere/track/dto/FailureTestCasesAdvanceDTO.java new file mode 100644 index 0000000000..ba39267353 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/dto/FailureTestCasesAdvanceDTO.java @@ -0,0 +1,16 @@ +package io.metersphere.track.dto; + +import io.metersphere.api.dto.automation.ApiScenarioDTO; +import io.metersphere.api.dto.definition.TestPlanApiCaseDTO; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Getter +@Setter +public class FailureTestCasesAdvanceDTO { + private List functionalTestCases; + private List apiTestCases; + private List scenarioTestCases; +} diff --git a/backend/src/main/java/io/metersphere/track/dto/TestCaseReportAdvanceStatusResultDTO.java b/backend/src/main/java/io/metersphere/track/dto/TestCaseReportAdvanceStatusResultDTO.java new file mode 100644 index 0000000000..a092ebd190 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/dto/TestCaseReportAdvanceStatusResultDTO.java @@ -0,0 +1,15 @@ +package io.metersphere.track.dto; + +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Getter +@Setter +public class TestCaseReportAdvanceStatusResultDTO { + private List functionalResult; + private List apiResult; + private List scenarioResult; +} + diff --git a/backend/src/main/java/io/metersphere/track/dto/TestCaseReportMetricDTO.java b/backend/src/main/java/io/metersphere/track/dto/TestCaseReportMetricDTO.java index b1b4e8fcd9..bd8f4c84a1 100644 --- a/backend/src/main/java/io/metersphere/track/dto/TestCaseReportMetricDTO.java +++ b/backend/src/main/java/io/metersphere/track/dto/TestCaseReportMetricDTO.java @@ -10,9 +10,11 @@ import java.util.List; @Setter public class TestCaseReportMetricDTO { - private List executeResult; +// private List executeResult; + private TestCaseReportAdvanceStatusResultDTO executeResult; private List moduleExecuteResult; - private List failureTestCases; + private FailureTestCasesAdvanceDTO failureTestCases; +// private List failureTestCases; private List Issues; private List executors; private String principal; diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index c218d0e95b..cd0e35302b 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -3,6 +3,10 @@ package io.metersphere.track.service; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import io.metersphere.api.dto.automation.ApiScenarioDTO; +import io.metersphere.api.dto.automation.TestPlanScenarioRequest; +import io.metersphere.api.dto.definition.ApiTestCaseRequest; +import io.metersphere.api.dto.definition.TestPlanApiCaseDTO; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.*; import io.metersphere.base.mapper.ext.ExtProjectMapper; @@ -22,6 +26,7 @@ import io.metersphere.notice.service.NoticeSendService; import io.metersphere.service.SystemParameterService; import io.metersphere.track.Factory.ReportComponentFactory; import io.metersphere.track.domain.ReportComponent; + import io.metersphere.track.dto.TestCaseReportMetricDTO; import io.metersphere.track.dto.TestPlanCaseDTO; import io.metersphere.track.dto.TestPlanDTO; @@ -80,6 +85,10 @@ public class TestPlanService { private NoticeSendService noticeSendService; @Resource private SystemParameterService systemParameterService; + @Resource + private TestPlanApiCaseService testPlanApiCaseService; + @Resource + private TestPlanScenarioCaseService testPlanScenarioCaseService; public synchronized void addTestPlan(AddTestPlanRequest testPlan) { if (getTestPlanByName(testPlan.getName()).size() > 0) { @@ -459,7 +468,6 @@ public class TestPlanService { } public TestCaseReportMetricDTO getMetric(String planId) { - IssuesService issuesService = (IssuesService) CommonBeanFactory.getBean("issuesService"); QueryTestPlanRequest queryTestPlanRequest = new QueryTestPlanRequest(); queryTestPlanRequest.setId(planId); @@ -472,31 +480,8 @@ public class TestPlanService { JSONArray componentIds = content.getJSONArray("components"); List components = ReportComponentFactory.createComponents(componentIds.toJavaList(String.class), testPlan); + List issues = buildFunctionalCaseReport(planId, components); - List testPlanTestCases = listTestCaseByPlanId(planId); - List issues = new ArrayList<>(); - for (TestPlanCaseDTO testCase : testPlanTestCases) { - List issue = issuesService.getIssues(testCase.getCaseId()); - if (issue.size() > 0) { - for (Issues i : issue) { - i.setModel(testCase.getNodePath()); - i.setProjectName(testCase.getProjectName()); - String des = i.getDescription().replaceAll("

", "").replaceAll("

", ""); - i.setDescription(des); - if (i.getLastmodify() == null || i.getLastmodify() == "") { - if (i.getReporter() != null || i.getReporter() != "") { - i.setLastmodify(i.getReporter()); - } - } - } - issues.addAll(issue); - Collections.sort(issues, Comparator.comparing(Issues::getCreateTime, (t1, t2) -> t2.compareTo(t1))); - } - - components.forEach(component -> { - component.readRecord(testCase); - }); - } TestCaseReportMetricDTO testCaseReportMetricDTO = new TestCaseReportMetricDTO(); components.forEach(component -> { component.afterBuild(testCaseReportMetricDTO); @@ -609,4 +594,78 @@ public class TestPlanService { return context; } + public TestCaseReportMetricDTO getStatisticsMetric(String planId) { + QueryTestPlanRequest queryTestPlanRequest = new QueryTestPlanRequest(); + queryTestPlanRequest.setId(planId); + + TestPlanDTO testPlan = extTestPlanMapper.list(queryTestPlanRequest).get(0); + String projectName = getProjectNameByPlanId(planId); + testPlan.setProjectName(projectName); + + TestCaseReport testCaseReport = testCaseReportMapper.selectByPrimaryKey(testPlan.getReportId()); + JSONObject content = JSONObject.parseObject(testCaseReport.getContent()); + JSONArray componentIds = content.getJSONArray("components"); + + List components = ReportComponentFactory.createComponents(componentIds.toJavaList(String.class), testPlan); + List issues = buildFunctionalCaseReport(planId, components); + buildApiCaseReport(planId, components); + buildScenarioCaseReport(planId, components); + + TestCaseReportMetricDTO testCaseReportMetricDTO = new TestCaseReportMetricDTO(); + components.forEach(component -> { + component.afterBuild(testCaseReportMetricDTO); + }); + testCaseReportMetricDTO.setIssues(issues); + return testCaseReportMetricDTO; + } + + public void buildApiCaseReport(String planId, List components) { + ApiTestCaseRequest request = new ApiTestCaseRequest(); + request.setPlanId(planId); + List apiCaseDTOS = testPlanApiCaseService.list(request); + for (TestPlanApiCaseDTO item : apiCaseDTOS) { + for (ReportComponent component : components) { + component.readRecord(item); + } + } + } + + public void buildScenarioCaseReport(String planId, List components) { + TestPlanScenarioRequest request = new TestPlanScenarioRequest(); + request.setPlanId(planId); + List scenarioDTOS = testPlanScenarioCaseService.list(request); + for (ApiScenarioDTO item : scenarioDTOS) { + for (ReportComponent component : components) { + component.readRecord(item); + } + } + } + + public List buildFunctionalCaseReport(String planId, List components) { + IssuesService issuesService = (IssuesService) CommonBeanFactory.getBean("issuesService"); + List testPlanTestCases = listTestCaseByPlanId(planId); + List issues = new ArrayList<>(); + for (TestPlanCaseDTO testCase : testPlanTestCases) { + List issue = issuesService.getIssues(testCase.getCaseId()); + if (issue.size() > 0) { + for (Issues i : issue) { + i.setModel(testCase.getNodePath()); + i.setProjectName(testCase.getProjectName()); + String des = i.getDescription().replaceAll("

", "").replaceAll("

", ""); + i.setDescription(des); + if (i.getLastmodify() == null || i.getLastmodify() == "") { + if (i.getReporter() != null || i.getReporter() != "") { + i.setLastmodify(i.getReporter()); + } + } + } + issues.addAll(issue); + Collections.sort(issues, Comparator.comparing(Issues::getCreateTime, (t1, t2) -> t2.compareTo(t1))); + } + components.forEach(component -> { + component.readRecord(testCase); + }); + } + return issues; + } } diff --git a/frontend/src/business/components/track/plan/view/TestPlanView.vue b/frontend/src/business/components/track/plan/view/TestPlanView.vue index 88124974bb..70b0a19033 100644 --- a/frontend/src/business/components/track/plan/view/TestPlanView.vue +++ b/frontend/src/business/components/track/plan/view/TestPlanView.vue @@ -14,11 +14,13 @@ class="el-menu-demo header-menu" mode="horizontal" @select="handleSelect"> 功能测试用例 接口测试用例 + 报告统计 + @@ -35,10 +37,12 @@ import MsTestPlanHeaderBar from "./comonents/head/TestPlanHeaderBar"; import TestPlanFunctional from "./comonents/functional/TestPlanFunctional"; import TestPlanApi from "./comonents/api/TestPlanApi"; + import TestCaseStatisticsReportView from "./comonents/report/statistics/TestCaseStatisticsReportView"; export default { name: "TestPlanView", components: { + TestCaseStatisticsReportView, TestPlanApi, TestPlanFunctional, MsTestPlanHeaderBar, diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/FailureResultAdvanceComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/FailureResultAdvanceComponent.vue new file mode 100644 index 0000000000..f2d1156cb2 --- /dev/null +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/FailureResultAdvanceComponent.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue index a43d582dae..79fedc9753 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TemplateComponent.vue @@ -5,8 +5,10 @@
- - + + + +
@@ -15,8 +17,10 @@
- - + + + +
@@ -32,10 +36,14 @@ import FailureResultComponent from "./FailureResultComponent"; import DefectListComponent from "./DefectListComponent"; import html2canvas from 'html2canvas'; + import TestResultAdvanceChartComponent from "./TestResultAdvanceChartComponent"; + import FailureResultAdvanceComponent from "./FailureResultAdvanceComponent"; export default { name: "TemplateComponent", components: { + FailureResultAdvanceComponent, + TestResultAdvanceChartComponent, FailureResultComponent,DefectListComponent, RichTextComponent, TestResultChartComponent, TestResultComponent, BaseInfoComponent}, props: { diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultAdvanceChartComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultAdvanceChartComponent.vue new file mode 100644 index 0000000000..1412d990a7 --- /dev/null +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultAdvanceChartComponent.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ApiFailureCasesList.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ApiFailureCasesList.vue new file mode 100644 index 0000000000..e8ee8e8118 --- /dev/null +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ApiFailureCasesList.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/FunctionalFailureCasesList.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/FunctionalFailureCasesList.vue new file mode 100644 index 0000000000..14f1e24d21 --- /dev/null +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/FunctionalFailureCasesList.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ScenarioFailureCasesList.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ScenarioFailureCasesList.vue new file mode 100644 index 0000000000..7370bcbedd --- /dev/null +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/component/ScenarioFailureCasesList.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/frontend/src/business/components/track/plan/view/comonents/report/statistics/TestCaseStatisticsReportView.vue b/frontend/src/business/components/track/plan/view/comonents/report/statistics/TestCaseStatisticsReportView.vue new file mode 100644 index 0000000000..fa8a85e64b --- /dev/null +++ b/frontend/src/business/components/track/plan/view/comonents/report/statistics/TestCaseStatisticsReportView.vue @@ -0,0 +1,265 @@ + + +cd + +