diff --git a/frontend/src/api/modules/test-plan/testPlan.ts b/frontend/src/api/modules/test-plan/testPlan.ts index 7febfb4182..e38af78961 100644 --- a/frontend/src/api/modules/test-plan/testPlan.ts +++ b/frontend/src/api/modules/test-plan/testPlan.ts @@ -82,6 +82,7 @@ import { SortApiCaseUrl, SortApiScenarioUrl, SortFeatureCaseUrl, + TaskResultUrl, TestPlanAndGroupCopyUrl, TestPlanApiAssociatedPageUrl, TestPlanAssociateBugUrl, @@ -127,6 +128,7 @@ import type { PlanDetailExecuteHistoryItem, PlanDetailFeatureCaseItem, PlanDetailFeatureCaseListQueryParams, + PlanExecuteResult, PlanMinderEditParams, PlanMinderNode, RunFeatureCaseParams, @@ -522,3 +524,8 @@ export function batchAssociatedBugToMinderCase(data: TableQueryParams) { export function batchAddBugToMinderCase(data: { request: BugEditFormObject; fileList: File[] }) { return MSR.uploadFile({ url: BatchAddBugToMinderCaseUrl }, data, '', true); } + +// 测试计划/组-执行结果 +export function getTaskResult(id: string) { + return MSR.get({ url: `${TaskResultUrl}/${id}` }); +} diff --git a/frontend/src/api/requrls/test-plan/testPlan.ts b/frontend/src/api/requrls/test-plan/testPlan.ts index 6c501ca660..b71d0848a8 100644 --- a/frontend/src/api/requrls/test-plan/testPlan.ts +++ b/frontend/src/api/requrls/test-plan/testPlan.ts @@ -188,3 +188,5 @@ export const BatchAddBugToCaseUrl = '/test-plan/functional/case/batch/add-bug'; export const BatchAssociatedBugToMinderCaseUrl = '/test-plan/functional/case/minder/batch/associate-bug'; // 测试计划-详情-用例列表-脑图批量新建缺陷 export const BatchAddBugToMinderCaseUrl = '/test-plan/functional/case/minder/batch/add-bug'; +// 测试计划/组-执行结果 +export const TaskResultUrl = '/test-plan/report/get-task'; diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index 13ac03243a..78d0436eaf 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -6,6 +6,7 @@ import type { customFieldsItem } from '@/models/caseManagement/featureCase'; import type { TableQueryParams } from '@/models/common'; import { BatchApiParams, DragSortParams } from '@/models/common'; import { CaseLinkEnum, LastExecuteResults } from '@/enums/caseEnum'; +import type { ExecuteStatusEnum } from '@/enums/taskCenter'; import { type PlanMinderAssociateType, type PlanMinderCollectionType, @@ -13,6 +14,8 @@ import { testPlanTypeEnum, } from '@/enums/testPlanEnum'; +import type { TaskReportDetail } from '../apiTest/report'; + export type planStatusType = 'PREPARED' | 'UNDERWAY' | 'COMPLETED' | 'ARCHIVED'; export interface AssociateFunctionalCaseItem { @@ -383,7 +386,7 @@ export interface PlanDetailExecuteHistoryItem { id: string; num: string; triggerMode: string; // 执行方式 - execResult: string; // 执行结果 + execResult: ExecuteStatusEnum; // 执行结果 operationUser: string; startTime: number; endTime: number; @@ -447,3 +450,17 @@ export interface PlanMinderEditParams { editList: PlanMinderEditListItem[]; deletedIds: string[]; } +export interface PlanExecuteResultExecuteCaseCount { + success: number; + error: number; + fakeError: number; + block: number; + pending: number; +} +export interface PlanExecuteResult extends TaskReportDetail { + taskName: string; + reportId: string; + childPlans: { id: string; name: string }[]; // 子计划 + createUser: string; + executeCaseCount: PlanExecuteResultExecuteCaseCount; +} diff --git a/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseExecuteHistory.vue b/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseExecuteHistory.vue index c8598dc0e2..a5b1cae5de 100644 --- a/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseExecuteHistory.vue +++ b/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseExecuteHistory.vue @@ -35,9 +35,16 @@ + +