From bf71b37cf4e08fa25782d3f5d42d6f0432b09df7 Mon Sep 17 00:00:00 2001
From: wenyann <64353056+wenyann@users.noreply.github.com>
Date: Thu, 13 Aug 2020 19:09:02 +0800
Subject: [PATCH 1/3] =?UTF-8?q?style:=20=E6=B5=8B=E8=AF=95=E6=8A=A5?=
=?UTF-8?q?=E5=91=8A=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../track/domain/ReportResultComponent.java | 20 +++++
.../dto/TestCaseReportModuleResultDTO.java | 5 ++
.../TemplateComponent/DefectListComponent.vue | 80 +++++++++++++++++++
.../TemplateComponent/TemplateComponent.vue | 5 +-
.../TemplateComponent/TestResultComponent.vue | 66 ++++++++++++---
.../report/TestCaseReportTemplateEdit.vue | 10 ++-
.../comonents/report/TestCaseReportView.vue | 4 +-
frontend/src/i18n/en-US.js | 2 +
frontend/src/i18n/zh-CN.js | 2 +
frontend/src/i18n/zh-TW.js | 2 +
10 files changed, 181 insertions(+), 15 deletions(-)
create mode 100644 frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue
diff --git a/backend/src/main/java/io/metersphere/track/domain/ReportResultComponent.java b/backend/src/main/java/io/metersphere/track/domain/ReportResultComponent.java
index 5f24e1a3b7..28c69361a3 100644
--- a/backend/src/main/java/io/metersphere/track/domain/ReportResultComponent.java
+++ b/backend/src/main/java/io/metersphere/track/domain/ReportResultComponent.java
@@ -86,12 +86,32 @@ public class ReportResultComponent extends ReportComponent {
moduleResult.setCaseCount(0);
moduleResult.setPassCount(0);
moduleResult.setIssuesCount(0);
+ moduleResult.setFailureCount(0);
+ moduleResult.setBlockingCount(0);
+ moduleResult.setPrepareCount(0);
+ moduleResult.setSkipCount(0);
+ moduleResult.setUnderwayCount(0);
moduleResult.setModuleId(rootNodeId);
}
moduleResult.setCaseCount(moduleResult.getCaseCount() + 1);
if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Pass.name())) {
moduleResult.setPassCount(moduleResult.getPassCount() + 1);
}
+ if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Prepare.name())) {
+ moduleResult.setPrepareCount(moduleResult.getPrepareCount() + 1);
+ }
+ if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Underway.name())) {
+ moduleResult.setUnderwayCount(moduleResult.getUnderwayCount() + 1);
+ }
+ if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Failure.name())) {
+ moduleResult.setFailureCount(moduleResult.getFailureCount() + 1);
+ }
+ if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Skip.name())) {
+ moduleResult.setSkipCount(moduleResult.getSkipCount() + 1);
+ }
+ if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Blocking.name())) {
+ moduleResult.setBlockingCount(moduleResult.getBlockingCount() + 1);
+ }
if (StringUtils.isNotBlank(testCase.getIssues())) {
if (JSON.parseObject(testCase.getIssues()).getBoolean("hasIssues")) {
moduleResult.setIssuesCount(moduleResult.getIssuesCount() + 1);
diff --git a/backend/src/main/java/io/metersphere/track/dto/TestCaseReportModuleResultDTO.java b/backend/src/main/java/io/metersphere/track/dto/TestCaseReportModuleResultDTO.java
index 59b82f0c50..00e05f9486 100644
--- a/backend/src/main/java/io/metersphere/track/dto/TestCaseReportModuleResultDTO.java
+++ b/backend/src/main/java/io/metersphere/track/dto/TestCaseReportModuleResultDTO.java
@@ -12,4 +12,9 @@ public class TestCaseReportModuleResultDTO {
private Integer passCount;
private Double passRate;
private Integer issuesCount;
+ private Integer prepareCount;
+ private Integer skipCount;
+ private Integer failureCount;
+ private Integer blockingCount;
+ private Integer underwayCount;
}
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue
new file mode 100644
index 0000000000..02acec71b1
--- /dev/null
+++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 911bddafe9..1d283a5e61 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
@@ -7,6 +7,7 @@
+
@@ -16,6 +17,7 @@
+
@@ -28,10 +30,11 @@
import TestResultChartComponent from "./TestResultChartComponent";
import RichTextComponent from "./RichTextComponent";
import FailureResultComponent from "./FailureResultComponent";
+ import DefectListComponent from "./DefectListComponent";
export default {
name: "TemplateComponent",
components: {
- FailureResultComponent,
+ FailureResultComponent,DefectListComponent,
RichTextComponent, TestResultChartComponent, TestResultComponent, BaseInfoComponent},
props: {
preview: {
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultComponent.vue
index c65c738aa5..8bca789386 100644
--- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultComponent.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/TestResultComponent.vue
@@ -18,6 +18,36 @@
:label="$t('test_track.plan_view.case_count')"
width="180">
+
+
+
+
+
+
+
+
+
+
+
+
@@ -50,19 +80,37 @@
moduleName: this.$t('test_track.module.module') + '1',
caseCount: '14',
passRate: 10.8,
- issuesCount: 3
+ issuesCount: 3,
+ passCount:0,
+ failureCount:0,
+ blockingCount:0,
+ skipCount:0,
+ underwayCount:0,
+ prepareCount:0
},
{
- moduleName: this.$t('test_track.module.module') + '2',
- caseCount: '24',
- passRate: 40,
- issuesCount: 6
+ moduleName: this.$t('test_track.module.module') + '1',
+ caseCount: '14',
+ passRate: 10.8,
+ issuesCount: 3,
+ passCount:0,
+ failureCount:0,
+ blockingCount:0,
+ skipCount:0,
+ underwayCount:0,
+ prepareCount:0
},
{
- moduleName: this.$t('test_track.module.module') + '3',
- caseCount: '50',
- passRate: 76.9,
- issuesCount: 8
+ moduleName: this.$t('test_track.module.module') + '1',
+ caseCount: '14',
+ passRate: 10.8,
+ issuesCount: 3,
+ passCount:0,
+ failureCount:0,
+ blockingCount:0,
+ skipCount:0,
+ underwayCount:0,
+ prepareCount:0
}
]
}
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue
index 87a24f035b..d5a022954b 100644
--- a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue
@@ -77,10 +77,11 @@
[2, { name: this.$t('test_track.plan_view.test_result'), id: 2 , type: 'system'}],
[3, { name: this.$t('test_track.plan_view.result_distribution'), id: 3 ,type: 'system'}],
[4, { name: this.$t('test_track.plan_view.failure_case'), id: 4 ,type: 'system'}],
- [5, { name: this.$t('test_track.plan_view.custom_component'), id: 5 ,type: 'custom'}]
+ [5, { name: this.$t('test_track.plan_view.defect_list'), id: 5 ,type: 'system'}],
+ [6, { name: this.$t('test_track.plan_view.custom_component'), id:6,type: 'custom'}]
]
),
- components: [5],
+ components: [6],
previews: [],
template: {},
isReport: false
@@ -109,12 +110,12 @@
this.template = {
name: '',
content: {
- components: [1,2,3,4,5],
+ components: [1,2,3,4,5,6],
customComponent: new Map()
}
};
this.previews = [];
- this.components = [5];
+ this.components = [6];
if (id) {
this.type = 'edit';
this.getTemplateById(id);
@@ -144,6 +145,7 @@
}
}
});
+
},
handleClose() {
window.removeEventListener('popstate', this.goBack, false);
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue
index a9f7514615..2689c0836a 100644
--- a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue
@@ -69,7 +69,8 @@
[2, { name: this.$t('test_track.plan_view.test_result'), id: 2 , type: 'system'}],
[3, { name: this.$t('test_track.plan_view.result_distribution'), id: 3 ,type: 'system'}],
[4, { name: this.$t('test_track.plan_view.failure_case'), id: 4 ,type: 'system'}],
- [5, { name: this.$t('test_track.plan_view.custom_component'), id: 5 ,type: 'custom'}]
+ [5, { name: this.$t('test_track.plan_view.defect_list'), id: 5 ,type: 'system'}],
+ [6, { name: this.$t('test_track.plan_view.custom_component'), id: 6 ,type: 'custom'}]
]
),
isTestManagerOrTestUser: false
@@ -166,6 +167,7 @@
getMetric() {
this.result = this.$get('/test/plan/get/metric/' + this.planId, response => {
this.metric = response.data;
+ console.log(this.metric)
if (!this.metric.failureTestCases) {
this.metric.failureTestCases = [];
}
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index 2d07634630..b44b6b3059 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -601,6 +601,7 @@ export default {
delete_confirm: "Confirm delete module:",
delete_all_resource: "and all submodules and test cases under the module",
module: "Module",
+ title:"Title"
},
home: {
recent_test: "Recent test",
@@ -640,6 +641,7 @@ export default {
result_distribution: "Result distribution",
custom_component: "Custom",
create_report: "Create report",
+ defect_list:"Defect list",
view_report: "View report",
component_library: "Component library",
component_library_tip: "Drag and drop the component from the component library, add to the right, preview the report effect, only one can be added per system component.",
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index bf943918e5..9467935821 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -606,6 +606,7 @@ export default {
delete_confirm: "确认删除模块: ",
delete_all_resource: "以及模块下所有子模块和测试用例",
module: "模块",
+ title:"标题",
},
home: {
recent_test: "最近测试",
@@ -644,6 +645,7 @@ export default {
test_result: "测试结果",
result_distribution: "测试结果分布",
custom_component: "自定义模块",
+ defect_list:"缺陷列表",
create_report: "创建测试报告",
view_report: "查看测试报告",
component_library: "组件库",
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index 1a0024912a..41a7c70dd4 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -601,6 +601,7 @@ export default {
delete_confirm: "確認刪除模塊: ",
delete_all_resource: "以及模塊下所有子模塊和測試用例",
module: "模塊",
+ title:"標題",
},
home: {
recent_test: "最近測試",
@@ -640,6 +641,7 @@ export default {
result_distribution: "測試結果分布",
custom_component: "自定義模塊",
create_report: "創建測試報告",
+ defect_list:"缺陷清單",
view_report: "查看測試報告",
component_library: "組件庫",
component_library_tip: "拖拽組件庫中組件,添加至右側,預覽報告效果,每個系統組件只能添加壹個。",
From 7f9d8235942a07ee18ec344f20a8f32928d203ff Mon Sep 17 00:00:00 2001
From: wangzhen-fit2cloud
Date: Fri, 14 Aug 2020 14:22:46 +0800
Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=20readme=20?=
=?UTF-8?q?=E6=A0=BC=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index b187c2dcdd..245a2a28ca 100755
--- a/README.md
+++ b/README.md
@@ -189,9 +189,9 @@ v1.1.0 是 v1.0.0 之后的功能版本。
## 致谢
-- [BlazeMeter](https://www.blazemeter.com/):感谢 BlazeMeter 提供的设计思路
-- [JMeter](https://jmeter.apache.org/):MeterSphere 使用了 JMeter 作为测试引擎
-- [Element](https://element.eleme.cn/#/):感谢 Element 提供的优秀组件库
+- [BlazeMeter](https://www.blazemeter.com/):感谢 BlazeMeter 提供的设计思路
+- [JMeter](https://jmeter.apache.org/):MeterSphere 使用了 JMeter 作为测试引擎
+- [Element](https://element.eleme.cn/#/):感谢 Element 提供的优秀组件库
## 加入 MeterSphere 团队
From 7e6530a591ae3198b891ecc30e860d3dcbf7af5a Mon Sep 17 00:00:00 2001
From: wenyann <64353056+wenyann@users.noreply.github.com>
Date: Fri, 14 Aug 2020 14:33:02 +0800
Subject: [PATCH 3/3] =?UTF-8?q?style(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA)?=
=?UTF-8?q?:=20=E6=B5=8B=E8=AF=95=E6=8A=A5=E5=91=8A=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../TemplateComponent/DefectListComponent.vue | 38 ++++++++++---------
.../TemplateComponent/TemplateComponent.vue | 2 +-
.../comonents/report/TestCaseReportView.vue | 4 +-
frontend/src/i18n/en-US.js | 6 ++-
frontend/src/i18n/zh-CN.js | 6 ++-
frontend/src/i18n/zh-TW.js | 6 ++-
6 files changed, 39 insertions(+), 23 deletions(-)
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue
index 02acec71b1..d04a69d014 100644
--- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/DefectListComponent.vue
@@ -2,7 +2,8 @@
-
-
+ prop="description"
+ :label="$t('test_track.module.describe')"
+ show-overflow-tooltip>
+ prop="status"
+ :label="$t('test_track.module.status')"
+ show-overflow-tooltip>
+ prop="currentOwner"
+ :label="$t('test_track.module.current_owner')"
+ show-overflow-tooltip>
+ prop="created"
+ :label="$t('test_track.module.creation_time')">
@@ -58,16 +57,19 @@
name: "DefectListComponent",
components: {StatusTableItem, MethodTableItem, TypeTableItem, PriorityTableItem, CommonComponent},
props: {
- failureTestCases: {
+ defectList: {
type: Array,
default() {
return [
{
+ id: "1023",
+ module: "模块e",
title: 'testCase1',
+ description: "第一个模块测试",
+ status: "接受/处理",
+ currentOwner: "Andy",
+ created: "2010.3.3",
},
- {
- title: 'testCase1',
- }
]
}
}
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 1d283a5e61..20f1782041 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
@@ -17,7 +17,7 @@
-
+
diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue
index 2689c0836a..47e43d6537 100644
--- a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue
+++ b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportView.vue
@@ -167,7 +167,6 @@
getMetric() {
this.result = this.$get('/test/plan/get/metric/' + this.planId, response => {
this.metric = response.data;
- console.log(this.metric)
if (!this.metric.failureTestCases) {
this.metric.failureTestCases = [];
}
@@ -177,6 +176,9 @@
if (!this.metric.moduleExecuteResult) {
this.metric.moduleExecuteResult = [];
}
+ /*缺陷列表*/
+ this.metric.defectList = [];
+
if (this.report.startTime) {
this.metric.startTime = new Date(this.report.startTime);
}
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index bee8cb3353..32e5a138c0 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -606,7 +606,11 @@ export default {
delete_confirm: "Confirm delete module:",
delete_all_resource: "and all submodules and test cases under the module",
module: "Module",
- title:"Title"
+ title: "Title",
+ describe: "Describe",
+ status: "Status",
+ current_owner: "Current Owner",
+ creation_time: "Creation time"
},
home: {
recent_test: "Recent test",
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index ed995f7b40..ca0b45eb0d 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -611,7 +611,11 @@ export default {
delete_confirm: "确认删除模块: ",
delete_all_resource: "以及模块下所有子模块和测试用例",
module: "模块",
- title:"标题",
+ title: "标题",
+ status: "状态",
+ describe: "描述",
+ current_owner: "处理人",
+ creation_time: "创建时间"
},
home: {
recent_test: "最近测试",
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index 8cc3789b1a..fce9ae9389 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -606,7 +606,11 @@ export default {
delete_confirm: "確認刪除模塊: ",
delete_all_resource: "以及模塊下所有子模塊和測試用例",
module: "模塊",
- title:"標題",
+ title: "標題",
+ status: "狀態",
+ describe: "描述",
+ current_owner: "處理人",
+ creation_time: "創建時間"
},
home: {
recent_test: "最近測試",