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 fcd0dbfd6e..822ad24f00 100644 --- a/backend/src/main/java/io/metersphere/api/controller/APITestController.java +++ b/backend/src/main/java/io/metersphere/api/controller/APITestController.java @@ -268,7 +268,7 @@ public class APITestController { @GetMapping("/countApiCoverage/{projectId}") public String countApiCoverage(@PathVariable String projectId) { - String returnStr = "100%"; + String returnStr = "0%"; /** * 接口覆盖率 * 接口有案例/被场景引用 : 所有的接口 @@ -289,7 +289,7 @@ public class APITestController { @GetMapping("/countInterfaceCoverage/{projectId}") public String countInterfaceCoverage(@PathVariable String projectId) { - String returnStr = "100%"; + String returnStr = "0%"; /** * 接口覆盖率 * 复制的接口定义/复制或引用的单接口用例/ 添加的自定义请求 url 路径与现有的接口定义一致的请求 diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 0721bb7e91..3daca61c19 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -1560,7 +1560,7 @@ public class ApiAutomationService { */ public float countInterfaceCoverage(List allScenarioInfoList, List allEffectiveApiList) { if (allEffectiveApiList == null || allEffectiveApiList.isEmpty()) { - return 100; + return 0; } Map> urlMap = new HashMap<>();