mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
feat(测试计划): 测试计划新增若干类型的用例统计,表头待选字段增加
--story=1004096 --user=周骏弘 1.测试计划待选字段增加 功能用例 接口用例 场景用例 性能用例 分别统计该测试计划中不同类型的用例数量展示在列表 https://www.tapd.cn/55049933/s/1074975
This commit is contained in:
parent
7944f838a3
commit
12a3551c8d
@ -115,7 +115,28 @@
|
||||
parameterType="io.metersphere.track.request.testcase.QueryTestPlanRequest">
|
||||
select DISTINCT test_plan.*, project.name as projectName,schedule.id as scheduleId,
|
||||
(select name from user where user.id = test_plan.creator) as createUser,
|
||||
IF(schedule.enable = true,true,false) as scheduleOpen
|
||||
IF(schedule.enable = true,true,false) as scheduleOpen,
|
||||
(select COUNT(t.id) from test_plan_test_case t
|
||||
inner join test_case on t.case_id = test_case.id
|
||||
left join test_case_node on test_case_node.id = test_case.node_id
|
||||
inner join project on project.id = test_case.project_id
|
||||
where t.plan_id = test_plan.id) as testPlanTestCaseCount,
|
||||
|
||||
(select COUNT(t.id) from test_plan_api_case t
|
||||
inner join api_test_case c on t.api_case_id = c.id
|
||||
inner join api_definition a on c.api_definition_id = a.id
|
||||
where t.test_plan_id = test_plan.id) as testPlanApiCaseCount,
|
||||
|
||||
(select COUNT(t.id) from test_plan_api_scenario t
|
||||
inner join api_scenario c on t.api_scenario_id = c.id and c.status != 'Trash'
|
||||
where t.test_plan_id = test_plan.id) as testPlanApiScenarioCount,
|
||||
|
||||
(select COUNT(t.id) from test_plan_load_case t
|
||||
inner join load_test lt on t.load_case_id = lt.id
|
||||
left join user u on lt.user_id = u.id
|
||||
left join project p on lt.project_id = p.id
|
||||
where t.test_plan_id = test_plan.id) as testPlanLoadCaseCount
|
||||
|
||||
from test_plan
|
||||
LEFT JOIN schedule ON schedule.resource_id = test_plan.id
|
||||
JOIN project on project.id = test_plan.project_id
|
||||
|
@ -12,4 +12,8 @@ public class TestPlanDTOWithMetric extends TestPlanDTO {
|
||||
private Integer tested;
|
||||
private Integer total;
|
||||
private String createUser;
|
||||
private Integer testPlanTestCaseCount;
|
||||
private Integer testPlanApiCaseCount;
|
||||
private Integer testPlanApiScenarioCount;
|
||||
private Integer testPlanLoadCaseCount;
|
||||
}
|
||||
|
@ -39,6 +39,10 @@ export const Test_Plan_List = [
|
||||
{id: 'executionTimes', label: i18n.t('commons.execution_times')},
|
||||
{id: 'passRate', label: i18n.t('commons.pass_rate')},
|
||||
{id: 'createUser', label: i18n.t('commons.create_user')},
|
||||
{id: 'testPlanTestCaseCount', label: i18n.t('test_track.plan.test_plan_test_case_count')},
|
||||
{id: 'testPlanApiCaseCount', label: i18n.t('test_track.plan.test_plan_api_case_count')},
|
||||
{id: 'testPlanApiScenarioCount', label: i18n.t('test_track.plan.test_plan_api_scenario_count')},
|
||||
{id: 'testPlanLoadCaseCount', label: i18n.t('test_track.plan.test_plan_load_case_count')}
|
||||
]
|
||||
//接口定义-api列表
|
||||
export const Api_List = [
|
||||
|
@ -128,6 +128,38 @@
|
||||
:min-width="100"
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id == 'testPlanTestCaseCount'"
|
||||
prop="testPlanTestCaseCount"
|
||||
:label="$t('test_track.plan.test_plan_test_case_count')"
|
||||
show-overflow-tooltip
|
||||
:min-width="100"
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id == 'testPlanApiCaseCount'"
|
||||
prop="testPlanApiCaseCount"
|
||||
:label="$t('test_track.plan.test_plan_api_case_count')"
|
||||
show-overflow-tooltip
|
||||
:min-width="100"
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id == 'testPlanApiScenarioCount'"
|
||||
prop="testPlanApiScenarioCount"
|
||||
:label="$t('test_track.plan.test_plan_api_scenario_count')"
|
||||
show-overflow-tooltip
|
||||
:min-width="100"
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id == 'testPlanLoadCaseCount'"
|
||||
prop="testPlanLoadCaseCount"
|
||||
:label="$t('test_track.plan.test_plan_load_case_count')"
|
||||
show-overflow-tooltip
|
||||
:min-width="100"
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id == 'passRate'"
|
||||
prop="passRate"
|
||||
|
@ -119,6 +119,10 @@ export let CUSTOM_TABLE_HEADER = {
|
||||
{id: 'executionTimes', key: 'c', label: 'commons.execution_times'},
|
||||
{id: 'passRate', key: 'd', label: 'commons.pass_rate'},
|
||||
{id: 'createUser', key: 'e', label: 'commons.create_user'},
|
||||
{id: 'testPlanTestCaseCount', key: 'f', label: 'test_track.plan.test_plan_test_case_count'},
|
||||
{id: 'testPlanApiCaseCount', key: 'g', label: 'test_track.plan.test_plan_api_case_count'},
|
||||
{id: 'testPlanApiScenarioCount', key: 'h', label: 'test_track.plan.test_plan_api_scenario_count'},
|
||||
{id: 'testPlanLoadCaseCount', key: 'i', label: 'test_track.plan.test_plan_load_case_count'}
|
||||
],
|
||||
//测试计划-功能用例
|
||||
TEST_PLAN_FUNCTION_TEST_CASE: [
|
||||
|
@ -1769,6 +1769,10 @@ export default {
|
||||
api_case: "Api case",
|
||||
scenario_case: "Scenario case",
|
||||
execute_result: "Execute Result",
|
||||
test_plan_test_case_count: "Track case count",
|
||||
test_plan_api_case_count: "Api case count",
|
||||
test_plan_api_scenario_count: "Scenario case count",
|
||||
test_plan_load_case_count: "Load case count",
|
||||
load_case: {
|
||||
case: "Load Case",
|
||||
execution_status: "Execution status",
|
||||
|
@ -1780,6 +1780,10 @@ export default {
|
||||
api_case: "接口测试用例",
|
||||
scenario_case: "场景测试用例",
|
||||
execute_result: "执行结果",
|
||||
test_plan_test_case_count: "功能用例数",
|
||||
test_plan_api_case_count: "接口用例数",
|
||||
test_plan_api_scenario_count: "场景用例数",
|
||||
test_plan_load_case_count: "性能用例数",
|
||||
load_case: {
|
||||
case: "性能用例",
|
||||
execution_status: "执行状态",
|
||||
|
@ -1778,6 +1778,10 @@ export default {
|
||||
api_case: "接口測試用例",
|
||||
scenario_case: "場景測試用例",
|
||||
execute_result: "執行結果",
|
||||
test_plan_test_case_count: "功能用例數",
|
||||
test_plan_api_case_count: "接口用例數",
|
||||
test_plan_api_scenario_count: "場景用例數",
|
||||
test_plan_load_case_count: "性能用例數",
|
||||
load_case: {
|
||||
case: "性能用例",
|
||||
execution_status: "執行狀態",
|
||||
|
Loading…
Reference in New Issue
Block a user