diff --git a/frontend/src/api/modules/test-plan/testPlan.ts b/frontend/src/api/modules/test-plan/testPlan.ts index fb28f2f888..8aff4f15b2 100644 --- a/frontend/src/api/modules/test-plan/testPlan.ts +++ b/frontend/src/api/modules/test-plan/testPlan.ts @@ -9,6 +9,8 @@ import { batchDeletePlanUrl, BatchDisassociateCaseUrl, batchMovePlanUrl, + BatchRunCaseUrl, + BatchUpdateCaseExecutorUrl, copyTestPlanUrl, deletePlanUrl, DeleteTestPlanModuleUrl, @@ -36,7 +38,9 @@ import { ModuleTreeNode } from '@/models/common'; import type { AddTestPlanParams, AssociateCaseRequestType, + BatchExecuteFeatureCaseParams, BatchFeatureCaseParams, + BatchUpdateCaseExecutorParams, DisassociateCaseParams, FollowPlanParams, PassRateCountDetail, @@ -166,6 +170,14 @@ export function disassociateCase(data: DisassociateCaseParams) { export function batchDisassociateCase(data: BatchFeatureCaseParams) { return MSR.post({ url: BatchDisassociateCaseUrl, data }); } +// 计划详情-功能用例列表-批量执行 +export function batchExecuteCase(data: BatchExecuteFeatureCaseParams) { + return MSR.post({ url: BatchRunCaseUrl, data }); +} +// 计划详情-功能用例列表-批量更新执行人 +export function batchUpdateCaseExecutor(data: BatchUpdateCaseExecutorParams) { + return MSR.post({ url: BatchUpdateCaseExecutorUrl, data }); +} // 计划详情-功能用例-执行 export function runFeatureCase(data: RunFeatureCaseParams) { return MSR.post({ url: RunFeatureCaseUrl, data }); diff --git a/frontend/src/api/requrls/test-plan/testPlan.ts b/frontend/src/api/requrls/test-plan/testPlan.ts index b359202f1f..8b0ab3140b 100644 --- a/frontend/src/api/requrls/test-plan/testPlan.ts +++ b/frontend/src/api/requrls/test-plan/testPlan.ts @@ -54,3 +54,7 @@ export const DisassociateCaseUrl = '/test-plan/functional/case/disassociate'; export const BatchDisassociateCaseUrl = '/test-plan/functional/case/batch/disassociate'; // 计划详情-功能用例-执行 export const RunFeatureCaseUrl = '/test-plan/functional/case/run'; +// 计划详情-功能用例-批量执行 +export const BatchRunCaseUrl = '/test-plan/functional/case/batch/run'; +// 计划详情-功能用例-批量更新执行人 +export const BatchUpdateCaseExecutorUrl = '/test-plan/functional/case/batch/update/executor'; diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index 8a86c25045..3a837e2bea 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -162,6 +162,30 @@ export interface DisassociateCaseParams { export interface BatchFeatureCaseParams extends BatchActionQueryParams { testPlanId: string; moduleIds?: string[]; + projectId: string; +} + +export interface ExecuteFeatureCaseFormParams { + lastExecResult: LastExecuteResults; + content?: string; + commentIds?: string[]; + planCommentFileIds?: string[]; +} + +export interface RunFeatureCaseParams extends ExecuteFeatureCaseFormParams { + projectId: string; + id: string; + testPlanId: string; + caseId: string; + notifier?: string; +} + +export interface BatchExecuteFeatureCaseParams extends BatchFeatureCaseParams, ExecuteFeatureCaseFormParams { + notifier?: string; +} + +export interface BatchUpdateCaseExecutorParams extends BatchFeatureCaseParams { + userId: string; } export interface PassRateCountDetail { @@ -180,19 +204,4 @@ export interface PassRateCountDetail { apiScenarioCount: number; } -export interface ExecuteFeatureCaseFormParams { - lastExecResult: LastExecuteResults; - content?: string; - commentIds?: string[]; - planCommentFileIds?: string[]; -} - -export interface RunFeatureCaseParams extends ExecuteFeatureCaseFormParams { - projectId: string; - id: string; - testPlanId: string; - caseId: string; - notifier?: string; -} - export default {}; diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue index cfc5e6d2df..1e5f9cdab8 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue @@ -47,7 +47,12 @@ - + {{ t('common.execute') }} @@ -74,13 +79,79 @@ + + + + {{ t('testPlan.testPlanIndex.batchExecution') }} + + {{ + t('testPlan.testPlanIndex.selectedCount', { + count: batchParams.currentSelectCount || tableSelected.length, + }) + }} + + + + + + + + {{ t('testPlan.featureCase.batchChangeExecutor') }} + + {{ + t('testPlan.testPlanIndex.selectedCount', { + count: batchParams.currentSelectCount || tableSelected.length, + }) + }} + + + + + + + +