From bb5ddf18f5311a8133ff57c997f3ea3df07d8430 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Thu, 1 Apr 2021 14:41:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8E=A5=E5=8F=A3=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E7=8E=87=E7=9A=84=E7=BB=9F=E8=AE=A1=E5=85=AC=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/APITestController.java | 12 ------------ .../base/mapper/ext/ExtApiDefinitionMapper.xml | 2 +- .../components/api/homepage/ApiTestHomePage.vue | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/controller/APITestController.java b/backend/src/main/java/io/metersphere/api/controller/APITestController.java index 185abbd176..9a0b8f1f41 100644 --- a/backend/src/main/java/io/metersphere/api/controller/APITestController.java +++ b/backend/src/main/java/io/metersphere/api/controller/APITestController.java @@ -288,23 +288,11 @@ public class APITestController { * 接口覆盖率 * 复制的接口定义/复制或引用的单接口用例/ 添加的自定义请求 url 路径与现有的接口定义一致的请求 */ - long startTime1 = System.currentTimeMillis(); List allScenarioInfoList = apiAutomationService.selectIdAndScenarioByProjectId(projectId); - long startTime2 = System.currentTimeMillis(); - System.out.println("Search data time : " + (startTime2 - startTime1)); - startTime1 = System.currentTimeMillis(); List allEffectiveApiIdList = apiDefinitionService.selectEffectiveIdByProjectId(projectId); - startTime2 = System.currentTimeMillis(); - System.out.println("Search data time (api info) : " + (startTime2 - startTime1)); List allEffectiveApiCaseList = apiTestCaseService.selectEffectiveTestCaseByProjectId(projectId); - long startTime3 = System.currentTimeMillis(); - System.out.println("Search data time (case info): " + (startTime3 - startTime2)); - try { - startTime1 = System.currentTimeMillis(); float intetfaceCoverageRageNumber = apiAutomationService.countInterfaceCoverage(allScenarioInfoList, allEffectiveApiIdList, allEffectiveApiCaseList); - startTime2 = System.currentTimeMillis(); - System.out.println("Count data time : " + (startTime2 - startTime1)); DecimalFormat df = new DecimalFormat("0.0"); returnStr = df.format(intetfaceCoverageRageNumber) + "%"; }catch (Exception e){ diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml index 7067ce9a49..a136fbd0af 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml @@ -468,7 +468,7 @@ diff --git a/frontend/src/business/components/api/homepage/ApiTestHomePage.vue b/frontend/src/business/components/api/homepage/ApiTestHomePage.vue index 1bd4373d58..e3610ad9b6 100644 --- a/frontend/src/business/components/api/homepage/ApiTestHomePage.vue +++ b/frontend/src/business/components/api/homepage/ApiTestHomePage.vue @@ -109,7 +109,7 @@ export default { this.$get("/api/testSceneInfoCount/" + selectProjectId, response => { this.sceneCountData = response.data; }); - + this.interfaceCoverage = "waitting..."; this.$get("/api/countInterfaceCoverage/" + selectProjectId, response => { this.interfaceCoverage = response.data; });