diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java index 2b6fa4155d..b82474612d 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioEnvService.java @@ -74,14 +74,11 @@ public class ApiScenarioEnvService { List hasFullUrlList = new ArrayList<>(); for (MsTestElement testElement : hashTree) { this.formatElement(testElement, env, hasFullUrlList); - if (CollectionUtils.isNotEmpty(testElement.getHashTree()) && !hasFullUrlList.contains(false)) { + if (CollectionUtils.isNotEmpty(testElement.getHashTree())) { getHashTree(testElement.getHashTree(), env, hasFullUrlList); } - if (hasFullUrlList.contains(false)) { - env.setFullUrl(false); - break; - } } + env.setFullUrl(!hasFullUrlList.contains(false)); return env; } @@ -92,12 +89,9 @@ public class ApiScenarioEnvService { tree = tree.stream().filter(item -> item.isEnable()).collect(Collectors.toList()); for (MsTestElement element : tree) { this.formatElement(element, env, hasFullUrlList); - if (CollectionUtils.isNotEmpty(element.getHashTree()) && !hasFullUrlList.contains(false)) { + if (CollectionUtils.isNotEmpty(element.getHashTree())) { getHashTree(element.getHashTree(), env, hasFullUrlList); } - if (hasFullUrlList.contains(false)) { - break; - } } } catch (Exception e) { LogUtil.error(e); diff --git a/test-track/frontend/src/business/plan/view/comonents/api/TestPlanApiCaseList.vue b/test-track/frontend/src/business/plan/view/comonents/api/TestPlanApiCaseList.vue index b8e779a89d..1e1db96465 100644 --- a/test-track/frontend/src/business/plan/view/comonents/api/TestPlanApiCaseList.vue +++ b/test-track/frontend/src/business/plan/view/comonents/api/TestPlanApiCaseList.vue @@ -593,9 +593,7 @@ export default { // 这里先打开报告,建立 websock // 否则可能执行完了才建立 websock,拿不到结果 this.$refs.apiCaseResult.open(reportId); - setTimeout(() => { - run(row.id, reportId); - }, 3000); + run(row.id, reportId); }, handleTestEnd(reportId) { if (this.runningReport.has(reportId)) {