From 400194b2120a4a95f66e1f48095c6b4332c75fa1 Mon Sep 17 00:00:00 2001 From: baiqi Date: Fri, 15 Nov 2024 14:54:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B/=E5=9C=BA=E6=99=AF/?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92/=E7=BB=84=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E5=8E=86=E5=8F=B2=E7=9A=84=E6=89=A7=E8=A1=8C=E7=BB=93?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/modules/test-plan/testPlan.ts | 7 + .../src/api/requrls/test-plan/testPlan.ts | 2 + frontend/src/models/testPlan/testPlan.ts | 19 +- .../case/tabContent/tabCaseExecuteHistory.vue | 28 +-- .../scenario/components/executeHistory.vue | 28 +-- .../scenario/components/scenarioTable.vue | 4 +- .../component/caseTaskDetailTable.vue | 18 +- .../taskCenter/component/caseTaskTable.vue | 6 +- .../component/executeRatePopper.vue | 14 +- ...tionStatus.vue => executeResultStatus.vue} | 0 .../testPlan/detail/executeHistory/index.vue | 38 ++-- .../testPlan/detail/executeResultDrawer.vue | 169 +++++++++--------- .../views/test-plan/testPlan/detail/index.vue | 2 +- 13 files changed, 199 insertions(+), 136 deletions(-) rename frontend/src/views/taskCenter/component/{executionStatus.vue => executeResultStatus.vue} (100%) 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 @@ + +