feat(测试跟踪): 测试计划报告增加责任人列

--story=1010102 --user=陈建星 【测试计划】功能用例分类和报告新增责任人列 https://www.tapd.cn/55049933/s/1264893
This commit is contained in:
chenjianxing 2022-10-17 18:40:21 +08:00 committed by jianxing
parent 975bfa5370
commit e9e4bc17e8
16 changed files with 232 additions and 182 deletions

View File

@ -194,9 +194,16 @@ public class ApiDefinitionService {
}
public List<ApiDefinition> selectByIds(ApiDefinitionRequest request) {
if (request != null && CollectionUtils.isNotEmpty(request.getIds())) {
if (request != null) {
return selectByIds(request.getIds());
}
return new ArrayList<>();
}
public List<ApiDefinition> selectByIds(List<String> ids) {
if (CollectionUtils.isNotEmpty(ids)) {
ApiDefinitionExample example = new ApiDefinitionExample();
example.createCriteria().andIdIn(request.getIds());
example.createCriteria().andIdIn(ids);
List<ApiDefinition> list = apiDefinitionMapper.selectByExample(example);
return list;
}

View File

@ -473,10 +473,27 @@ public class TestPlanApiCaseService {
if (CollectionUtils.isEmpty(apiTestCases)) {
return apiTestCases;
}
buildPrincipal(apiTestCases);
buildUserInfo(apiTestCases);
return apiTestCases;
}
/**
* 从接口定义查询责任人
* 如果之后接口用例有独立的责任人则不从接口定义查
* @param apiTestCases
*/
private void buildPrincipal(List<TestPlanFailureApiDTO> apiTestCases) {
List<String> apiIds = apiTestCases.stream()
.map(TestPlanFailureApiDTO::getApiDefinitionId)
.collect(Collectors.toList());
Map<String, String> userIdMap = apiDefinitionService.selectByIds(apiIds)
.stream()
.collect(Collectors.toMap(ApiDefinition::getId, ApiDefinition::getUserId));
apiTestCases.forEach(item -> item.setUserId(userIdMap.get(item.getApiDefinitionId())));
}
public void initOrderField() {
ServiceUtils.initOrderField(TestPlanApiCase.class, TestPlanApiCaseMapper.class, extTestPlanApiCaseMapper::selectPlanIds, extTestPlanApiCaseMapper::getIdsOrderByUpdateTime);
}

View File

@ -502,7 +502,8 @@ export const PRINCIPAL = {
}
};
export const API_PRINCIPAL = PRINCIPAL;
export const API_PRINCIPAL = {};
Object.assign(API_PRINCIPAL, PRINCIPAL);
API_PRINCIPAL.key = 'creator';
// 测试阶段
@ -826,7 +827,7 @@ export const API_SCENARIO_CONFIGS_TRASH = [ID, NAME, PRIORITY, TAGS, API_SCENARI
export const TEST_PLAN_REPORT_CONFIGS = [NAME, TEST_PLAN_NAME, CREATOR, CREATE_TIME, TEST_PLAN_TRIGGER_MODE, TEST_PLAN_REPORT_STATUS];
// 测试计划 功能用例
export const TEST_PLAN_TEST_CASE_CONFIGS = [NAME, TAGS, MODULE, PRIORITY, CREATE_TIME, UPDATE_TIME, EXECUTOR, CASE_REVIEW_STATUS, PLAN_CASE_STATUS];
export const TEST_PLAN_TEST_CASE_CONFIGS = [NAME, TAGS, MODULE, PRIORITY, CREATE_TIME, UPDATE_TIME, EXECUTOR, CASE_REVIEW_STATUS, PLAN_CASE_STATUS, PRINCIPAL];
// 测试计划关联页面
export const TEST_PLAN_RELEVANCE_FUNC_CONFIGS = [NAME, TAGS, CREATE_TIME, UPDATE_TIME, CREATOR];

View File

@ -108,151 +108,6 @@ export let CUSTOM_TABLE_HEADER = {
{id: 'lastResult', key: 'a', label: 'ui.debug_result_label'},
{id: 'createTime', key: 'c', label: 'commons.create_time'},
],
//用例评审
TEST_CASE_REVIEW: [
{id: 'name', key: '1', label: 'test_track.review.review_name'},
{id: 'reviewer', key: '2', label: 'test_track.review.reviewer'},
{id: 'projectName', key: '3', label: 'test_track.review.review_project'},
{id: 'creatorName', key: '4', label: 'test_track.review.creator'},
{id: 'status', key: '5', label: 'test_track.review.review_status'},
{id: 'createTime', key: '6', label: 'commons.create_time'},
{id: 'endTime', key: '7', label: 'test_track.review.end_time'},
{id: 'tags', key: '8', label: 'commons.tag'},
],
//用例评审-功能用例
TEST_CASE_REVIEW_FUNCTION_TEST_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'commons.name'},
{id: 'versionId', key: 'b', label: 'commons.version'},
{id: 'priority', key: '3', label: 'test_track.case.priority'},
{id: 'nodePath', key: '5', label: 'test_track.case.module'},
{id: 'projectName', key: '6', label: 'test_track.review.review_project'},
{id: 'reviewerName', key: '7', label: 'test_track.review.reviewer'},
{id: 'reviewStatus', key: '8', label: 'test_track.case.status'},
{id: 'updateTime', key: '9', label: 'commons.update_time'},
{id: 'maintainerName', key: 'a', label: 'custom_field.case_maintainer'},
],
//测试计划
TEST_PLAN_LIST: [
{id: 'name', key: '1', label: 'commons.name'},
{id: 'status', key: '3', label: 'test_track.plan.plan_status'},
{id: 'stage', key: '4', label: 'test_track.plan.plan_stage'},
{id: 'testRate', key: '5', label: 'test_track.home.test_rate'},
{id: 'projectName', key: '6', label: 'test_track.plan.plan_project'},
{id: 'plannedStartTime', key: '7', label: 'test_track.plan.planned_start_time'},
{id: 'plannedEndTime', key: '8', label: 'test_track.plan.planned_end_time'},
{id: 'actualStartTime', key: '9', label: 'test_track.plan.actual_start_time'},
{id: 'actualEndTime', key: 'a', label: 'test_track.plan.actual_end_time'},
{id: 'tags', key: 'b', label: 'commons.tag'},
{id: 'scheduleStatus', key: 'c', label: 'commons.trigger_mode.schedule'},
{id: 'passRate', key: 'e', label: 'commons.pass_rate'},
{id: 'createUser', key: 'f', label: 'commons.create_user'},
{id: 'testPlanTestCaseCount', key: 'g', label: 'test_track.plan.test_plan_test_case_count'},
{id: 'testPlanApiCaseCount', key: 'h', label: 'test_track.plan.test_plan_api_case_count'},
{id: 'testPlanApiScenarioCount', key: 'i', label: 'test_track.plan.test_plan_api_scenario_count'},
{id: 'testPlanLoadCaseCount', key: 'j', label: 'test_track.plan.test_plan_load_case_count'},
{id: 'principalName', key: 'k', label: 'test_track.plan.plan_principal'},
],
//测试计划-功能用例
TEST_PLAN_FUNCTION_TEST_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'commons.name'},
{id: 'versionId', key: 'b', label: 'project.version.name', xpack: true},
{id: 'tags', key: '3', label: 'commons.tag'},
{id: 'nodePath', key: '4', label: 'test_track.case.module'},
{id: 'projectName', key: '5', label: 'test_track.review.review_project'},
{id: 'issuesContent', key: '6', label: 'test_track.issue.issue'},
{id: 'executor', key: '7', label: 'test_track.plan_view.executor'},
{id: 'status', key: '8', label: 'test_track.plan_view.execute_result'},
{id: 'updateTime', key: '9', label: 'commons.update_time'},
{id: 'createTime', key: 'a', label: 'commons.create_time'},
],
//测试计划-api用例
TEST_PLAN_API_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'api_test.definition.api_name'},
{id: 'versionId', key: 'd', label: 'commons.version'},
{id: 'priority', key: '3', label: 'test_track.case.priority'},
{id: 'path', key: '4', label: 'api_test.definition.api_path'},
{id: 'createUser', key: '5', label: 'api_test.creator'},
{id: 'tags', key: '7', label: 'commons.tag'},
{id: 'execResult', key: '8', label: 'test_track.plan.execute_result'},
{id: 'maintainer', key: '9', label: 'api_test.definition.request.responsible'},
{id: 'updateTime', key: 'a', label: 'api_test.automation.update_time'},
{id: 'createTime', key: 'b', label: 'commons.create_time'},
{id: 'environmentName', key: 'c', label: 'commons.environment'},
],
//测试计划-性能用例
TEST_PLAN_LOAD_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'caseName', key: '2', label: 'commons.name'},
{id: 'versionId', key: '9', label: 'commons.version'},
{id: 'projectName', key: '3', label: 'load_test.project_name'},
{id: 'userName', key: '4', label: 'load_test.user_name'},
{id: 'createTime', key: '5', label: 'commons.create_time'},
{id: 'status', key: '6', label: 'commons.status'},
{id: 'caseStatus', key: '7', label: 'test_track.plan.load_case.execution_status'},
{id: 'loadReportId', key: '8', label: 'test_track.plan.load_case.report'},
],
//测试计划-场景用例
TEST_PLAN_SCENARIO_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'api_test.automation.scenario_name'},
{id: 'versionId', key: 'd', label: 'commons.version'},
{id: 'level', key: '3', label: 'api_test.automation.case_level'},
{id: 'tagNames', key: '4', label: 'api_test.automation.tag'},
{id: 'stepTotal', key: '7', label: 'api_test.automation.step'},
{id: 'envs', key: '8', label: 'commons.environment'},
{id: 'passRate', key: '9', label: 'api_test.automation.passing_rate'},
{id: 'maintainer', key: 'a', label: 'api_test.definition.request.responsible'},
{id: 'createUser', key: '5', label: 'api_test.automation.creator'},
{id: 'updateTime', key: '6', label: 'api_test.automation.update_time'},
{id: 'createTime', key: 'b', label: 'commons.create_time'},
{id: 'lastResult', key: 'c', label: 'api_test.automation.last_result'},
],
//测试计划-UI用例
TEST_PLAN_UI_SCENARIO_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'api_test.automation.scenario_name'},
{id: 'versionId', key: 'd', label: 'commons.version'},
{id: 'level', key: '3', label: 'api_test.automation.case_level'},
{id: 'tagNames', key: '4', label: 'api_test.automation.tag'},
{id: 'stepTotal', key: '7', label: 'api_test.automation.step'},
{id: 'passRate', key: '9', label: 'api_test.automation.passing_rate'},
{id: 'maintainer', key: 'a', label: 'api_test.definition.request.responsible'},
{id: 'createUser', key: '5', label: 'api_test.automation.creator'},
{id: 'updateTime', key: '6', label: 'api_test.automation.update_time'},
{id: 'createTime', key: 'b', label: 'commons.create_time'},
{id: 'lastResult', key: 'c', label: 'api_test.automation.last_result'},
],
//测试用例
TRACK_TEST_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'commons.name'},
{id: 'reviewStatus', key: '3', label: 'test_track.case.status'},
{id: 'tags', key: '4', label: 'commons.tag'},
{id: 'versionId', key: 'b', label: 'project.version.name', xpack: true},
{id: 'nodePath', key: '5', label: 'test_track.case.module'},
{id: 'updateTime', key: '6', label: 'commons.update_time'},
{id: 'createUser', key: '7', label: 'commons.create_user'},
{id: 'createTime', key: '8', label: 'commons.create_time'},
{id: 'desc', key: '9', label: 'test_track.case.case_desc'},
{id: 'lastExecuteResult', key: '0', label: 'test_track.plan_view.execute_result'},
],
// 公共用例库
TRACK_PUBLIC_TEST_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'commons.name'},
{id: 'reviewStatus', key: '3', label: 'test_track.case.status'},
{id: 'tags', key: '4', label: 'commons.tag'},
{id: 'versionId', key: 'b', label: 'project.version.name', xpack: true},
{id: 'projectName', key: '5', label: 'test_track.case.project'},
{id: 'updateTime', key: '6', label: 'commons.update_time'},
{id: 'createName', key: '7', label: 'commons.create_user'},
{id: 'createTime', key: '8', label: 'commons.create_time'},
{id: 'desc', key: '9', label: 'test_track.case.case_desc'},
{id: 'lastExecuteResult', key: '0', label: 'test_track.plan_view.execute_result'},
],
// 测试报告
TRACK_REPORT_TABLE: [
{id: 'name', key: '1', label: 'test_track.report.list.name'},
@ -273,19 +128,6 @@ export let CUSTOM_TABLE_HEADER = {
{id: 'value', key: '4', label: 'api_test.value'},
],
//缺陷列表
ISSUE_LIST: [
{id: 'num', key: '1', label: 'test_track.issue.id'},
{id: 'title', key: '2', label: 'test_track.issue.title'},
{id: 'platformStatus', key: '3', label: 'test_track.issue.status'},
{id: 'platform', key: '4', label: 'test_track.issue.platform'},
{id: 'creatorName', key: '5', label: 'custom_field.issue_creator'},
{id: 'resourceName', key: '6', label: 'test_track.issue.issue_resource'},
{id: 'description', key: '7', label: 'test_track.issue.description'},
{id: 'caseCount', key: '9', label: 'api_test.definition.api_case_number'},
{id: 'createTime', key: '8', label: 'commons.create_time'},
],
//缺陷列表
ELEMENT_LIST: [
{id: 'num', key: '1', label: 'ID'},

View File

@ -89,12 +89,24 @@
<property name="object" value="${condition}.method"/>
</include>
</if>
<if test="${condition}.creator != null">
<if test="${condition}.maintainer != null">
and test_case.maintainer
<include refid="condition">
<property name="object" value="${condition}.maintainer"/>
</include>
</if>
<if test="${condition}.creator != null">
and test_case.create_user
<include refid="condition">
<property name="object" value="${condition}.creator"/>
</include>
</if>
<if test="${condition}.principal != null">
and test_case.maintainer
<include refid="condition">
<property name="object" value="${condition}.principal"/>
</include>
</if>
<if test="${condition}.executor != null">
and test_plan_test_case.executor
<include refid="condition">
@ -208,7 +220,7 @@
#{value}
</foreach>
</when>
<when test="key=='maintainer'">
<when test="key=='maintainer' or key = 'maintainer_name'">
and test_case.maintainer in
<foreach collection="values" item="value" separator="," open="(" close=")">
#{value}
@ -479,6 +491,7 @@
tc.node_id, tc.tags, tptc.actual_result,
tptc.update_time, tptc.create_time,
tptc.issues_count, tptc.status,
tc.maintainer,
tptc.plan_id, tptc.executor
from test_plan_test_case tptc
inner join test_case tc on tptc.case_id = tc.id

View File

@ -26,6 +26,7 @@ public class TestPlanCaseDTO extends TestCaseWithBLOBs {
private Boolean isCustomNum;
private int issuesCount;
private String versionName;
private String creatorName;
private List<io.metersphere.dto.TestCaseTestDTO> list;
private List<IssuesDao> issueList;

View File

@ -530,6 +530,7 @@ public class TestPlanTestCaseService {
boolean customNum = config.getCaseCustomNum();
item.setIsCustomNum(customNum);
item.setExecutorName(userNameMap.get(item.getExecutor()));
item.setMaintainerName(userNameMap.get(item.getMaintainer()));
});
}

View File

@ -150,7 +150,7 @@
<ms-table-column
prop="executor"
:filters="executorFilters"
:filters="userFilters"
min-width="100px"
:field="item"
:fields-width="fieldsWidth"
@ -163,11 +163,11 @@
<!-- 责任人(创建该用例时所关联的责任人) -->
<ms-table-column
prop="maintainerName"
:filters="maintainerFilters"
:filters="userFilters"
min-width="100px"
:field="item"
:fields-width="fieldsWidth"
:label="$t('api_test.definition.request.responsible')"/>
:label="$t('test_track.plan.plan_principal')"/>
<ms-table-column
prop="status"
@ -373,8 +373,7 @@ export default {
{text: this.$t('test_track.plan_view.blocking'), value: 'Blocking'},
{text: this.$t('test_track.plan_view.skip'), value: 'Skip'}
],
executorFilters: [],
maintainerFilters: [],
userFilters: [],
showMore: false,
typeArr: [
{id: 'status', name: this.$t('test_track.plan_view.execute_result')},
@ -770,12 +769,9 @@ export default {
getProjectMemberOption()
.then(response => {
this.valueArr.executor = response.data;
this.executorFilters = response.data.map(u => {
this.userFilters = response.data.map(u => {
return {text: u.name, value: u.id};
});
this.maintainerFilters = response.data.map(u => {
return {text: u.id + '(' + u.name + ')', value: u.id};
});
});
},
getVersionOptions() {

View File

@ -23,9 +23,9 @@
prop="name">
</ms-table-column>
<ms-table-column
:label="$t('commons.create_user')"
prop="creatorName"/>
<el-table-column
prop="principalName"
:label="$t('test_track.plan.plan_principal')"/>
<ms-table-column
:label="$t('test_track.case.priority')"

View File

@ -21,9 +21,9 @@
:label="$t('commons.name')"
prop="name">
</ms-table-column>
<ms-table-column
:label="$t('test_track.report.list.creator')"
prop="creatorName"/>
<el-table-column
prop="principalName"
:label="$t('test_track.plan.plan_principal')"/>
<ms-table-column
:label="$t('test_track.case.priority')"
:width="80">

View File

@ -36,6 +36,11 @@
:label="$t('test_track.plan_view.executor')">
</el-table-column>
<el-table-column
prop="maintainerName"
:label="$t('test_track.plan.plan_principal')">
</el-table-column>
<el-table-column
prop="status"
column-key="status"

View File

@ -21,9 +21,9 @@
:label="$t('commons.name')"
prop="name">
</ms-table-column>
<ms-table-column
:label="$t('test_track.report.list.creator')"
prop="creatorName"/>
<el-table-column
prop="principalName"
:label="$t('test_track.plan.plan_principal')"/>
<ms-table-column
:label="$t('test_track.case.priority')"
:width="80">

View File

@ -1,4 +1,5 @@
import Vue from 'vue';
import "@/business/utils/track-table-header";
import ElementUI, {Button, Col, Form, FormItem, Input, Row, Main, Card, Table, TableColumn, Popover} from 'element-ui';
import 'metersphere-frontend/src/assets/theme/index.css';
import 'metersphere-frontend/src/styles/business/menu-header.css';

View File

@ -4,6 +4,7 @@ export {getCurrentProjectID, getCurrentWorkspaceId, getCurrentUser} from "meters
export {hasLicense, hasPermissions, hasPermission} from "metersphere-frontend/src/utils/permission";
export {get, post, downloadFile, fileDownloadGet, fileDownloadPost, fileUpload, generateShareUrl, generateModuleUrl} from "metersphere-frontend/src/plugins/request";
export {CURRENT_LANGUAGE} from "metersphere-frontend/src/utils/constants";
export {CUSTOM_TABLE_HEADER} from "metersphere-frontend/src/utils/default-table-header";
export {generateColumnKey, getAdvSearchCustomField} from "metersphere-frontend/src/components/search/custom-component";

View File

@ -0,0 +1,164 @@
import {CUSTOM_TABLE_HEADER} from "@/business/utils/sdk-utils";
//测试计划-功能用例
const TRACK_HEADER = {
TEST_PLAN_FUNCTION_TEST_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'commons.name'},
{id: 'versionId', key: 'b', label: 'project.version.name', xpack: true},
{id: 'tags', key: '3', label: 'commons.tag'},
{id: 'nodePath', key: '4', label: 'test_track.case.module'},
{id: 'projectName', key: '5', label: 'test_track.review.review_project'},
{id: 'issuesContent', key: '6', label: 'test_track.issue.issue'},
{id: 'executor', key: '7', label: 'test_track.plan_view.executor'},
{id: 'maintainerName', key: 'c', label: 'test_track.plan.plan_principal'},
{id: 'status', key: '8', label: 'test_track.plan_view.execute_result'},
{id: 'updateTime', key: '9', label: 'commons.update_time'},
{id: 'createTime', key: 'a', label: 'commons.create_time'},
],
//测试计划
TEST_PLAN_LIST: [
{id: 'name', key: '1', label: 'commons.name'},
{id: 'status', key: '3', label: 'test_track.plan.plan_status'},
{id: 'stage', key: '4', label: 'test_track.plan.plan_stage'},
{id: 'testRate', key: '5', label: 'test_track.home.test_rate'},
{id: 'projectName', key: '6', label: 'test_track.plan.plan_project'},
{id: 'plannedStartTime', key: '7', label: 'test_track.plan.planned_start_time'},
{id: 'plannedEndTime', key: '8', label: 'test_track.plan.planned_end_time'},
{id: 'actualStartTime', key: '9', label: 'test_track.plan.actual_start_time'},
{id: 'actualEndTime', key: 'a', label: 'test_track.plan.actual_end_time'},
{id: 'tags', key: 'b', label: 'commons.tag'},
{id: 'scheduleStatus', key: 'c', label: 'commons.trigger_mode.schedule'},
{id: 'passRate', key: 'e', label: 'commons.pass_rate'},
{id: 'createUser', key: 'f', label: 'commons.create_user'},
{id: 'testPlanTestCaseCount', key: 'g', label: 'test_track.plan.test_plan_test_case_count'},
{id: 'testPlanApiCaseCount', key: 'h', label: 'test_track.plan.test_plan_api_case_count'},
{id: 'testPlanApiScenarioCount', key: 'i', label: 'test_track.plan.test_plan_api_scenario_count'},
{id: 'testPlanLoadCaseCount', key: 'j', label: 'test_track.plan.test_plan_load_case_count'},
{id: 'principalName', key: 'k', label: 'test_track.plan.plan_principal'},
],
//测试计划-api用例
TEST_PLAN_API_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'api_test.definition.api_name'},
{id: 'versionId', key: 'd', label: 'commons.version'},
{id: 'priority', key: '3', label: 'test_track.case.priority'},
{id: 'path', key: '4', label: 'api_test.definition.api_path'},
{id: 'createUser', key: '5', label: 'api_test.creator'},
{id: 'tags', key: '7', label: 'commons.tag'},
{id: 'execResult', key: '8', label: 'test_track.plan.execute_result'},
{id: 'maintainer', key: '9', label: 'api_test.definition.request.responsible'},
{id: 'updateTime', key: 'a', label: 'api_test.automation.update_time'},
{id: 'createTime', key: 'b', label: 'commons.create_time'},
{id: 'environmentName', key: 'c', label: 'commons.environment'},
],
//测试计划-性能用例
TEST_PLAN_LOAD_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'caseName', key: '2', label: 'commons.name'},
{id: 'versionId', key: '9', label: 'commons.version'},
{id: 'projectName', key: '3', label: 'load_test.project_name'},
{id: 'userName', key: '4', label: 'load_test.user_name'},
{id: 'createTime', key: '5', label: 'commons.create_time'},
{id: 'status', key: '6', label: 'commons.status'},
{id: 'caseStatus', key: '7', label: 'test_track.plan.load_case.execution_status'},
{id: 'loadReportId', key: '8', label: 'test_track.plan.load_case.report'},
],
//测试计划-场景用例
TEST_PLAN_SCENARIO_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'api_test.automation.scenario_name'},
{id: 'versionId', key: 'd', label: 'commons.version'},
{id: 'level', key: '3', label: 'api_test.automation.case_level'},
{id: 'tagNames', key: '4', label: 'api_test.automation.tag'},
{id: 'stepTotal', key: '7', label: 'api_test.automation.step'},
{id: 'envs', key: '8', label: 'commons.environment'},
{id: 'passRate', key: '9', label: 'api_test.automation.passing_rate'},
{id: 'maintainer', key: 'a', label: 'api_test.definition.request.responsible'},
{id: 'createUser', key: '5', label: 'api_test.automation.creator'},
{id: 'updateTime', key: '6', label: 'api_test.automation.update_time'},
{id: 'createTime', key: 'b', label: 'commons.create_time'},
{id: 'lastResult', key: 'c', label: 'api_test.automation.last_result'},
],
//测试计划-UI用例
TEST_PLAN_UI_SCENARIO_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'api_test.automation.scenario_name'},
{id: 'versionId', key: 'd', label: 'commons.version'},
{id: 'level', key: '3', label: 'api_test.automation.case_level'},
{id: 'tagNames', key: '4', label: 'api_test.automation.tag'},
{id: 'stepTotal', key: '7', label: 'api_test.automation.step'},
{id: 'passRate', key: '9', label: 'api_test.automation.passing_rate'},
{id: 'maintainer', key: 'a', label: 'api_test.definition.request.responsible'},
{id: 'createUser', key: '5', label: 'api_test.automation.creator'},
{id: 'updateTime', key: '6', label: 'api_test.automation.update_time'},
{id: 'createTime', key: 'b', label: 'commons.create_time'},
{id: 'lastResult', key: 'c', label: 'api_test.automation.last_result'},
],
//测试用例
TRACK_TEST_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'commons.name'},
{id: 'reviewStatus', key: '3', label: 'test_track.case.status'},
{id: 'tags', key: '4', label: 'commons.tag'},
{id: 'versionId', key: 'b', label: 'project.version.name', xpack: true},
{id: 'nodePath', key: '5', label: 'test_track.case.module'},
{id: 'updateTime', key: '6', label: 'commons.update_time'},
{id: 'createUser', key: '7', label: 'commons.create_user'},
{id: 'createTime', key: '8', label: 'commons.create_time'},
{id: 'desc', key: '9', label: 'test_track.case.case_desc'},
{id: 'lastExecuteResult', key: '0', label: 'test_track.plan_view.execute_result'},
],
// 公共用例库
TRACK_PUBLIC_TEST_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'commons.name'},
{id: 'reviewStatus', key: '3', label: 'test_track.case.status'},
{id: 'tags', key: '4', label: 'commons.tag'},
{id: 'versionId', key: 'b', label: 'project.version.name', xpack: true},
{id: 'projectName', key: '5', label: 'test_track.case.project'},
{id: 'updateTime', key: '6', label: 'commons.update_time'},
{id: 'createName', key: '7', label: 'commons.create_user'},
{id: 'createTime', key: '8', label: 'commons.create_time'},
{id: 'desc', key: '9', label: 'test_track.case.case_desc'},
{id: 'lastExecuteResult', key: '0', label: 'test_track.plan_view.execute_result'},
],
//缺陷列表
ISSUE_LIST: [
{id: 'num', key: '1', label: 'test_track.issue.id'},
{id: 'title', key: '2', label: 'test_track.issue.title'},
{id: 'platformStatus', key: '3', label: 'test_track.issue.status'},
{id: 'platform', key: '4', label: 'test_track.issue.platform'},
{id: 'creatorName', key: '5', label: 'custom_field.issue_creator'},
{id: 'resourceName', key: '6', label: 'test_track.issue.issue_resource'},
{id: 'description', key: '7', label: 'test_track.issue.description'},
{id: 'caseCount', key: '9', label: 'api_test.definition.api_case_number'},
{id: 'createTime', key: '8', label: 'commons.create_time'},
],
//用例评审
TEST_CASE_REVIEW: [
{id: 'name', key: '1', label: 'test_track.review.review_name'},
{id: 'reviewer', key: '2', label: 'test_track.review.reviewer'},
{id: 'projectName', key: '3', label: 'test_track.review.review_project'},
{id: 'creatorName', key: '4', label: 'test_track.review.creator'},
{id: 'status', key: '5', label: 'test_track.review.review_status'},
{id: 'createTime', key: '6', label: 'commons.create_time'},
{id: 'endTime', key: '7', label: 'test_track.review.end_time'},
{id: 'tags', key: '8', label: 'commons.tag'},
],
//用例评审-功能用例
TEST_CASE_REVIEW_FUNCTION_TEST_CASE: [
{id: 'num', key: '1', label: 'commons.id'},
{id: 'name', key: '2', label: 'commons.name'},
{id: 'versionId', key: 'b', label: 'commons.version'},
{id: 'priority', key: '3', label: 'test_track.case.priority'},
{id: 'nodePath', key: '5', label: 'test_track.case.module'},
{id: 'projectName', key: '6', label: 'test_track.review.review_project'},
{id: 'reviewerName', key: '7', label: 'test_track.review.reviewer'},
{id: 'reviewStatus', key: '8', label: 'test_track.case.status'},
{id: 'updateTime', key: '9', label: 'commons.update_time'},
{id: 'maintainerName', key: 'a', label: 'custom_field.case_maintainer'},
],
}
Object.assign(CUSTOM_TABLE_HEADER, TRACK_HEADER);

View File

@ -1,4 +1,5 @@
import "./public-path"
import "@/business/utils/track-table-header";
import Vue from "vue"
import "metersphere-frontend/src/styles/index.scss"
import ElementUI from "element-ui";