fix:测试用例添加责任人
This commit is contained in:
parent
5573b9fd61
commit
0cbfda31da
|
@ -10,4 +10,5 @@ public class TestPlanApiCaseDTO extends ApiTestCaseDTO {
|
|||
private String environmentId;
|
||||
private String caseId;
|
||||
private String execResult;
|
||||
private String userId;
|
||||
}
|
||||
|
|
|
@ -18,8 +18,9 @@
|
|||
<select id="list" resultType="io.metersphere.api.dto.definition.TestPlanApiCaseDTO">
|
||||
select
|
||||
t.id, t.environment_id, t.create_time, t.update_time,
|
||||
c.id as case_id, c.project_id, c.name, c.api_definition_id, c.priority, c.description, c.create_user_id, c.update_user_id, c.num, c.tags,
|
||||
a.module_id, a.path, a.protocol, t.status execResult
|
||||
c.id as case_id, c.project_id, c.name, c.api_definition_id, c.priority, c.description, c.create_user_id,
|
||||
c.update_user_id, c.num, c.tags,
|
||||
a.module_id, a.path, a.protocol, t.status execResult, a.user_id
|
||||
from
|
||||
test_plan_api_case t
|
||||
inner join
|
||||
|
|
|
@ -100,8 +100,9 @@
|
|||
select test_case_review_test_case.id as id, test_case_review_test_case.reviewer,
|
||||
test_case_review_test_case.update_time, test_case_review_test_case.review_id as reviewId,
|
||||
test_case.id as caseId, test_case.name, test_case.priority, test_case.test_id as testId,
|
||||
test_case.type, test_case.node_path, test_case.method, if(project.custom_num = 0, cast(test_case.num as char), test_case.custom_num) as customNum, test_case.review_status,
|
||||
test_case.remark as remark, test_case.steps as steps, test_case.node_id as nodeId,
|
||||
test_case.type, test_case.node_path, test_case.method, if(project.custom_num = 0, cast(test_case.num as char),
|
||||
test_case.custom_num) as customNum, test_case.review_status,
|
||||
test_case.remark as remark, test_case.maintainer, test_case.steps as steps, test_case.node_id as nodeId,
|
||||
test_case_node.name as model,
|
||||
project.name as projectName
|
||||
from test_case_review_test_case
|
||||
|
|
|
@ -37,38 +37,48 @@ DROP PROCEDURE IF EXISTS project_systemid;
|
|||
|
||||
-- 清空system_header表
|
||||
truncate table system_header;
|
||||
|
||||
insert into system_header (type, props)
|
||||
values ('api_scenario_list',
|
||||
'[{"id":"num","label":"ID"},{"id":"name","label":"场景名称"},{"id":"level","label":"用例等级"},{"id":"status","label":"当前状态"},{"id":"tags","label":"标签"},{"id":"principal","label":"负责人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"步骤数"},{"id":"lastResult","label":"最后结果"},{"id":"passRate","label":"通过率"}]');
|
||||
|
||||
insert into system_header (type, props)
|
||||
values ('test_plan_function_test_case',
|
||||
'[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"type","label":"类型"},{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"projectName","label":"所属项目"},{"id":"issuesContent","label":"缺陷"},{"id":"executorName","label":"执行人"},{"id":"status","label":"执行结果"},{"id":"updateTime","label":"更新时间"},{"id":"maintainer","label":"责任人"}]');
|
||||
insert into system_header (type, props)
|
||||
values ('test_case_review_case_list',
|
||||
'[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"type","label":"类型"},{"id":"method","label":"测试方式"},{"id":"nodePath","label":"所属模块"},{"id":"projectName","label":"所属项目"},{"id":"reviewerName","label":"评审人"},{"id":"reviewStatus","label":"评审状态"},{"id":"updateTime","label":"更新时间"}]');
|
||||
|
||||
insert into system_header (type, props)
|
||||
values ('test_plan_load_case',
|
||||
'[{"id":"num","label":"ID"},{"id":"caseName","label":"名称"},{"id":"projectName","label":"所属项目"},{"id":"userName","label":"创建人"},{"id":"createTime","label":"创建时间"},{"id":"status","label":"状态"},{"id":"caseStatus","label":"执行状态"},{"id":"loadReportId","label":"查看报告"}]');
|
||||
|
||||
insert into system_header (type, props)
|
||||
values ('api_case_list',
|
||||
'[{"id":"num","label":"ID"},{"id":"name","label":"用例名称"},{"id":"priority","label":"用例等级"},{"id":"path","label":"路径"},{"id":"tags","label":"标签"},{"id":"createUser","label":"创建人"},{"id":"updateTime","label":"最后更新时间"}]');
|
||||
|
||||
insert into system_header (type, props)
|
||||
values ('api_list',
|
||||
'[{"id":"num","label":"ID"},{"id":"status","label":"接口状态"},{"id":"name","label":"接口名称"},{"id":"method","label":"请求类型"},{"id":"userName","label":"负责人"},{"id":"path","label":"路径"},{"id":"tags","label":"标签"},{"id":"updateTime","label":"最后更新时间"},{"id":"caseTotal","label":"用例数"},{"id":"caseStatus","label":"用例状态"},{"id":"casePassingRate","label":"用例通过率"}]');
|
||||
|
||||
insert into system_header (type, props)
|
||||
values ('test_case_review_list',
|
||||
'[{"id":"name","label":"评审名称"},{"id":"reviewer","label":"评审人"},{"id":"projectName","label":"所属项目"},{"id":"creatorName","label":"发起人"},{"id":"status","label":"当前状态"},{"id":"createTime","label":"创建时间"},{"id":"endTime","label":"截止时间"},{"id":"tags","label":"标签"}]');
|
||||
|
||||
insert into system_header (type, props)
|
||||
values ('test_plan_api_case',
|
||||
'[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"path","label":"路径"},{"id":"createUser","label":"创建人"},{"id":"custom","label":"最后更新时间"},{"id":"tags","label":"标签"},{"id":"execResult","label":"执行状态"}]');
|
||||
|
||||
insert into system_header (type, props)
|
||||
values ('test_plan_list', '[{"id":"name","label":"名称"},{"id":"userName","label":"负责人"},{"id":"createUser","label":"创建人"},{"id":"status","label":"当前状态"},{"id":"stage","label":"测试阶段"},{"id":"testRate","label":"测试进度"},{"id":"projectName","label":"所属项目"},{"id":"plannedStartTime","label":"计划开始"},
|
||||
{"id":"plannedEndTime","label":"计划结束"},{"id":"actualStartTime","label":"实际开始"},
|
||||
{"id":"actualEndTime","label":"实际结束"},{"id":"tags","label":"标签"},
|
||||
{"id":"executionTimes","label":"执行次数"},{"id":"passRate","label":"通过率"}]');
|
||||
|
||||
insert into system_header (type, props)
|
||||
values ('test_case_list',
|
||||
'[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"createUser","label":"创建人"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"},{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"}]');
|
||||
|
||||
insert into system_header (type, props)
|
||||
values ('test_plan_scenario_case',
|
||||
'[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]');
|
||||
|
@ -79,3 +89,18 @@ alter table api_definition
|
|||
add case_status varchar(100) null;
|
||||
alter table api_definition
|
||||
add case_passing_rate varchar(100) null;
|
||||
|
||||
-- 测试用例表头添加责任人
|
||||
|
||||
update system_header
|
||||
set props='[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"type","label":"类型"},{"id":"method","label":"测试方式"},{"id":"nodePath","label":"所属模块"},{"id":"projectName","label":"所属项目"},{"id":"reviewerName","label":"评审人"},{"id":"maintainer","label":"责任人"},{"id":"reviewStatus","label":"评审状态"},{"id":"updateTime","label":"更新时间"}]'
|
||||
where type = 'test_case_review_case_list';
|
||||
update system_header
|
||||
set props='[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"path","label":"路径"},{"id":"createUser","label":"创建人"},{"id":"maintainer","label":"责任人"},{"id":"custom","label":"最后更新时间"},{"id":"tags","label":"标签"},{"id":"execResult","label":"执行状态"}]'
|
||||
where type = 'test_plan_api_case';
|
||||
update system_header
|
||||
set props='[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"maintainer","label":"责任人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]'
|
||||
where type = 'test_plan_scenario_case';
|
||||
update system_header
|
||||
set props='[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"createUser","label":"创建人"},{"id":"maintainer","label":"责任人"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"},{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"}]'
|
||||
where type = 'test_case_list';
|
||||
|
|
|
@ -10,6 +10,7 @@ export const Track_Test_Case = [
|
|||
{id: 'nodePath', label: i18n.t('test_track.case.module')},
|
||||
{id: 'updateTime', label: i18n.t('commons.update_time')},
|
||||
{id: 'createUser', label: i18n.t('commons.create_user')},
|
||||
{id: 'maintainer', label: i18n.t('custom_field.case_maintainer')},
|
||||
]
|
||||
//用例评审-测试用例
|
||||
export const Test_Case_Review = [
|
||||
|
@ -91,6 +92,7 @@ export const Test_Case_Review_Case_List = [
|
|||
{id: 'reviewerName', label: i18n.t('test_track.review.reviewer')},
|
||||
{id: 'reviewStatus', label: i18n.t('test_track.case.status')},
|
||||
{id: 'updateTime', label: i18n.t('commons.update_time')},
|
||||
{id: 'maintainer', label: i18n.t('custom_field.case_maintainer')},
|
||||
]
|
||||
//测试计划-功能用例
|
||||
export const Test_Plan_Function_Test_Case = [
|
||||
|
@ -117,6 +119,8 @@ export const Test_Plan_Api_Case = [
|
|||
{id: 'custom', label: i18n.t('api_test.definition.api_last_time')},
|
||||
{id: 'tags', label: i18n.t('commons.tag')},
|
||||
{id: 'execResult', label: '执行状态'},
|
||||
{id: 'maintainer', label: i18n.t('api_test.definition.request.responsible')}
|
||||
|
||||
]
|
||||
//测试计划-性能用例
|
||||
export const Test_Plan_Load_Case = [
|
||||
|
@ -140,5 +144,7 @@ export const Test_Plan_Scenario_Case = [
|
|||
{id: 'stepTotal', label: i18n.t('api_test.automation.success')},
|
||||
{id: 'lastResult', label: i18n.t('api_test.automation.fail')},
|
||||
{id: 'passRate', label: i18n.t('api_test.automation.passing_rate')},
|
||||
{id: 'maintainer', label: i18n.t('api_test.definition.request.responsible')}
|
||||
|
||||
]
|
||||
|
||||
|
|
|
@ -71,6 +71,15 @@
|
|||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id == 'maintainer'"
|
||||
prop="maintainer"
|
||||
:label="$t('custom_field.case_maintainer')"
|
||||
show-overflow-tooltip
|
||||
:key="index"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id == 'priority'"
|
||||
prop="priority"
|
||||
|
|
|
@ -70,6 +70,15 @@
|
|||
:label="'创建人'"
|
||||
show-overflow-tooltip
|
||||
:key="index"/>
|
||||
<el-table-column
|
||||
v-if="item.id == 'maintainer'"
|
||||
prop="userId"
|
||||
:label="$t('custom_field.case_maintainer')"
|
||||
show-overflow-tooltip
|
||||
:key="index"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.id == 'custom'"
|
||||
|
|
|
@ -52,8 +52,18 @@
|
|||
:content="itemName" style="margin-left: 0px; margin-right: 2px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.id == 'userId'" prop="userId" :label="$t('api_test.automation.creator')" min-width="100px"
|
||||
<el-table-column v-if="item.id == 'userId'" prop="userId" :label="$t('api_test.automation.creator')"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip :key="index"/>
|
||||
<el-table-column
|
||||
v-if="item.id == 'maintainer'"
|
||||
prop="principal"
|
||||
:label="$t('custom_field.case_maintainer')"
|
||||
show-overflow-tooltip
|
||||
:key="index"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.id == 'updateTime'"
|
||||
prop="updateTime"
|
||||
min-width="120px"
|
||||
|
@ -63,7 +73,8 @@
|
|||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.id == 'stepTotal'" prop="stepTotal" :label="$t('api_test.automation.step')" min-width="80px"
|
||||
<el-table-column v-if="item.id == 'stepTotal'" prop="stepTotal" :label="$t('api_test.automation.step')"
|
||||
min-width="80px"
|
||||
show-overflow-tooltip :key="index"/>
|
||||
<el-table-column v-if="item.id == 'lastResult'" prop="lastResult" min-width="100px"
|
||||
:filters="RESULT_FILTERS"
|
||||
|
|
|
@ -90,7 +90,15 @@
|
|||
<type-table-item :value="scope.row.type"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="item.id == 'maintainer'"
|
||||
prop="maintainer"
|
||||
:label="$t('custom_field.case_maintainer')"
|
||||
show-overflow-tooltip
|
||||
:key="index"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id=='nodePath'"
|
||||
prop="nodePath"
|
||||
|
|
Loading…
Reference in New Issue