This commit is contained in:
shiziyuan9527 2020-08-14 14:50:47 +08:00
commit 5b61ff1f99
11 changed files with 200 additions and 18 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -0,0 +1,82 @@
<template>
<common-component :title="$t('test_track.plan_view.defect_list')">
<template>
<el-table
row-key="id"
:data="defectList"
>
<el-table-column
prop="id"
:label="$t('commons.id')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="module"
:label="$t('test_track.module.module')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="title"
:label="$t('test_track.module.title')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="description"
:label="$t('test_track.module.describe')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="status"
:label="$t('test_track.module.status')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="currentOwner"
:label="$t('test_track.module.current_owner')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="created"
:label="$t('test_track.module.creation_time')">
</el-table-column>
</el-table>
</template>
</common-component>
</template>
<script>
import CommonComponent from "./CommonComponent";
import PriorityTableItem from "../../../../../common/tableItems/planview/PriorityTableItem";
import TypeTableItem from "../../../../../common/tableItems/planview/TypeTableItem";
import MethodTableItem from "../../../../../common/tableItems/planview/MethodTableItem";
import StatusTableItem from "../../../../../common/tableItems/planview/StatusTableItem";
export default {
name: "DefectListComponent",
components: {StatusTableItem, MethodTableItem, TypeTableItem, PriorityTableItem, CommonComponent},
props: {
defectList: {
type: Array,
default() {
return [
{
id: "1023",
module: "模块e",
title: 'testCase1',
description: "第一个模块测试",
status: "接受/处理",
currentOwner: "Andy",
created: "2010.3.3",
},
]
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -7,6 +7,7 @@
<test-result-component v-if="preview.id == 2"/>
<test-result-chart-component v-if="preview.id == 3"/>
<failure-result-component v-if="preview.id == 4"/>
<defect-list-component v-if="preview.id == 5"/>
<rich-text-component :preview="preview" v-if="preview.type != 'system'"/>
</div>
@ -16,6 +17,7 @@
<test-result-component :test-results="metric.moduleExecuteResult" v-if="preview.id == 2"/>
<test-result-chart-component :execute-result="metric.executeResult" v-if="preview.id == 3"/>
<failure-result-component :failure-test-cases="metric.failureTestCases" v-if="preview.id == 4"/>
<defect-list-component :defect-list="metric.defectList" v-if="preview.id == 5"/>
<rich-text-component :is-report-view="isReportView" :preview="preview" v-if="preview.type != 'system'"/>
</div>
@ -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: {

View File

@ -18,6 +18,36 @@
:label="$t('test_track.plan_view.case_count')"
width="180">
</el-table-column>
<el-table-column
prop="passCount"
:label="$t('test_track.plan_view.pass')"
width="180">
</el-table-column>
<el-table-column
prop="failureCount"
:label="$t('test_track.plan_view.failure')"
width="180">
</el-table-column>
<el-table-column
prop="blockingCount"
:label="$t('test_track.plan_view.blocking')"
width="180">
</el-table-column>
<el-table-column
prop="skipCount"
:label="$t('test_track.plan_view.skip')"
width="180">
</el-table-column>
<el-table-column
prop="underwayCount"
:label="$t('test_track.plan.plan_status_running')"
width="180">
</el-table-column>
<el-table-column
prop="prepareCount"
:label="$t('test_track.plan.plan_status_prepare')"
width="180">
</el-table-column>
<el-table-column
prop="passRate"
:label="$t('test_track.pass_rate')">
@ -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
}
]
}

View File

@ -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);

View File

@ -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
@ -175,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);
}

View File

@ -610,6 +610,11 @@ export default {
delete_confirm: "Confirm delete module:",
delete_all_resource: "and all submodules and test cases under the module",
module: "Module",
title: "Title",
describe: "Describe",
status: "Status",
current_owner: "Current Owner",
creation_time: "Creation time"
},
home: {
recent_test: "Recent test",
@ -649,6 +654,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.",

View File

@ -615,6 +615,11 @@ export default {
delete_confirm: "确认删除模块: ",
delete_all_resource: "以及模块下所有子模块和测试用例",
module: "模块",
title: "标题",
status: "状态",
describe: "描述",
current_owner: "处理人",
creation_time: "创建时间"
},
home: {
recent_test: "最近测试",
@ -653,6 +658,7 @@ export default {
test_result: "测试结果",
result_distribution: "测试结果分布",
custom_component: "自定义模块",
defect_list:"缺陷列表",
create_report: "创建测试报告",
view_report: "查看测试报告",
component_library: "组件库",

View File

@ -610,6 +610,11 @@ export default {
delete_confirm: "確認刪除模塊: ",
delete_all_resource: "以及模塊下所有子模塊和測試用例",
module: "模塊",
title: "標題",
status: "狀態",
describe: "描述",
current_owner: "處理人",
creation_time: "創建時間"
},
home: {
recent_test: "最近測試",
@ -649,6 +654,7 @@ export default {
result_distribution: "測試結果分布",
custom_component: "自定義模塊",
create_report: "創建測試報告",
defect_list:"缺陷清單",
view_report: "查看測試報告",
component_library: "組件庫",
component_library_tip: "拖拽組件庫中組件,添加至右側,預覽報告效果,每個系統組件只能添加壹個。",