From 28deabd68fb1ae1044a8e7e919c7f46f136908ba Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 17 Feb 2022 17:25:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=A4=B1=E8=B4=A5=E7=94=A8?= =?UTF-8?q?=E4=BE=8BTOP10=E6=97=A0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1010277 --user=lyh 【测试跟踪】+【接口测试】github#10501v1.17.2 测试跟踪 和 接口测试 模块首页的 失败用例TOP10 无数据 https://www.tapd.cn/55049933/s/1105255 Closes #10501 --- .../base/mapper/ext/ExtApiDefinitionExecResultMapper.xml | 6 ++---- .../api/homepage/components/ApiFailureTestCaseList.vue | 8 ++++---- .../api/homepage/components/FailureTestCaseList.vue | 8 ++++---- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml index 323b1cb9c0..841e60bd89 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml @@ -37,13 +37,12 @@ -- api_test_case 只查找测试计划执行的结果 SELECT testCase.testCaseID AS testCaseID,testCase.id AS id,testCase.testCaseName AS caseName,testCase.testPlanName AS testPlan ,caseErrorCountData.dataCountNumber AS failureTimes,'apiCase' AS caseType FROM ( - SELECT testPlanCase.id AS testCaseID,apiCase.id AS id,apiCase.`name` AS testCaseName,group_concat(testPlan.`name`) AS testPlanName, testPlanCase.update_time as updateTime + SELECT testPlanCase.id AS testPlanCaseID, testPlanCase.api_case_id as testCaseID, apiCase.id AS id,apiCase.`name` AS testCaseName,testPlan.`name` AS testPlanName, testPlanCase.update_time as updateTime FROM api_test_case apiCase inner join api_definition on api_definition.id = apiCase.api_definition_id INNER JOIN test_plan_api_case testPlanCase ON testPlanCase.api_case_id = apiCase.id INNER JOIN test_plan testPlan ON testPlan.id = testPlanCase.test_plan_id and api_definition.status != 'Trash' - GROUP BY apiCase.id ORDER BY apiCase.create_time DESC )testCase INNER JOIN ( @@ -53,12 +52,11 @@ INNER JOIN test_plan_api_case t2 ON t1.id = t2.api_case_id WHERE t1.project_id = #{projectId} ) and `status` = 'error' GROUP BY resource_id - ) caseErrorCountData ON caseErrorCountData.testPlanCaseID =testCase.testCaseID + ) caseErrorCountData ON caseErrorCountData.testPlanCaseID =testCase.testPlanCaseID WHERE testCase.updateTime >= #{startTimestamp} UNION SELECT scene.id AS testCaseID,scene.id AS id,scene.`name` AS caseName,apiScene.testPlanName AS testPlan,count(report.id) AS failureTimes,'scenario' AS caseType FROM api_scenario_report report - INNER JOIN api_scenario_report_detail reportDetail ON report.id = reportDetail.report_id INNER JOIN api_scenario scene ON report.scenario_id = scene.id INNER JOIN( SELECT apiScene.api_scenario_id, group_concat(testPlan.`name`) AS testPlanName diff --git a/frontend/src/business/components/api/homepage/components/ApiFailureTestCaseList.vue b/frontend/src/business/components/api/homepage/components/ApiFailureTestCaseList.vue index 3516969c79..a7cda43063 100644 --- a/frontend/src/business/components/api/homepage/components/ApiFailureTestCaseList.vue +++ b/frontend/src/business/components/api/homepage/components/ApiFailureTestCaseList.vue @@ -16,15 +16,15 @@ width="150" show-overflow-tooltip>