refactor(测试计划): 接口用例列表增加环境列

This commit is contained in:
shiziyuan9527 2021-08-09 14:16:58 +08:00 committed by 刘瑞斌
parent 6009411649
commit b103a40361
8 changed files with 26 additions and 6 deletions

View File

@ -13,4 +13,5 @@ public class TestPlanApiCaseDTO extends ApiTestCaseDTO {
private String creatorName;
private String principalName;
private String updateName;
private String environmentName;
}

View File

@ -27,7 +27,7 @@
</select>
<select id="list" resultType="io.metersphere.api.dto.definition.TestPlanApiCaseDTO">
select
t.id, t.environment_id, t.create_time, t.update_time,
t.id, t.environment_id,(select name from api_test_environment where id = t.environment_id) as environment_name, 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, t.create_user,
a.module_id, a.path, a.protocol, t.status execResult, a.user_id

View File

@ -116,8 +116,8 @@ export const REQUIRED = [
];
export const RESULT_MAP = new Map([
['success', '执行结果:通过'],
['error', '执行结果:未通过'],
['default', '执行结果:未执行']
['success', '通过'],
['error', '未通过'],
['default', '未执行']
]);

View File

@ -68,6 +68,18 @@
</template>
</ms-table-column>
<ms-table-column
:field="item"
:fields-width="fieldsWidth"
prop="environmentName"
min-width="120"
show-overflow-tooltip
:label="$t('commons.environment')">
<template v-slot:default="scope">
{{scope.row.environmentName || '-'}}
</template>
</ms-table-column>
<ms-table-column
v-if="item.id == 'maintainer'"
prop="userId"
@ -97,7 +109,7 @@
<ms-table-column :field="item"
prop="execResult"
:fields-width="fieldsWidth"
:label="'执行状态'" min-width="150" align="center">
:label="$t('test_track.plan.execute_result')" min-width="150" align="center">
<template v-slot:default="scope">
<div v-loading="rowLoading === scope.row.id">
<el-link type="danger"

View File

@ -139,8 +139,9 @@ export let CUSTOM_TABLE_HEADER = {
{id: 'createUser', key: '5', label: 'api_test.creator'},
{id: 'custom', key: '6', label: 'api_test.definition.api_last_time'},
{id: 'tags', key: '7', label: 'commons.tag'},
{id: 'execResult', key: '8', label: '执行状态'},
{id: 'execResult', key: '8', label: 'test_track.plan.execute_result'},
{id: 'maintainer', key: '9', label: 'api_test.definition.request.responsible'},
{id: 'environmentName', key: '10', label: 'commons.environment'},
{id: 'updateTime', key: 'a', label: 'api_test.automation.update_time'},
{id: 'createTime', key: 'b', label: 'commons.create_time'},
],

View File

@ -175,6 +175,7 @@ export default {
execute_history: "Execute history",
debug_history: "Debug history",
testing: "Testing",
environment: "Environment",
table: {
select_tip: "Item {0} data is selected"
},
@ -1536,6 +1537,7 @@ export default {
plan_delete: "Delete test plan",
api_case: "Api case",
scenario_case: "Scenario case",
execute_result: "Execute Result",
load_case: {
case: "Load Case",
execution_status: "Execution status",

View File

@ -176,6 +176,7 @@ export default {
execute_history: "执行历史",
debug_history: "调试历史",
testing: "测试中",
environment: "运行环境",
table: {
select_tip: "已选中 {0} 条数据"
},
@ -1542,6 +1543,7 @@ export default {
plan_delete: "删除计划",
api_case: "接口测试用例",
scenario_case: "场景测试用例",
execute_result: "执行结果",
load_case: {
case: "性能用例",
execution_status: "执行状态",

View File

@ -176,6 +176,7 @@ export default {
execute_history: "執行歷史",
debug_history: "調試歷史",
testing: "測試中",
environment: "運行環境",
selector: {
required: "必填",
not_required: "非必填",
@ -1543,6 +1544,7 @@ export default {
plan_delete: "刪除計劃",
api_case: "接口測試用例",
scenario_case: "場景測試用例",
execute_result: "執行結果",
load_case: {
case: "性能用例",
execution_status: "執行狀態",