From f9c5f40bb081e6e7ec9002dee74df9d4f26d03d9 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Wed, 22 Dec 2021 16:51:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=A1=E5=88=92=E4=B8=AD=E5=8D=95=E6=9D=A1?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=89=A7=E8=A1=8C=E6=8A=A5=E5=91=8A=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009088 --user=赵勇 【测试跟踪】测试计划 - 接口测试用例 - 场景用例列表,单独执行场景,提示报告已删除 https://www.tapd.cn/55049933/s/1085127 --- .../metersphere/api/jmeter/JMeterService.java | 2 +- .../api/automation/report/ApiReportDetail.vue | 25 ++++++++++++------- .../comonents/api/TestPlanApiScenarioList.vue | 4 ++- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java index 61fd1584f3..ff5deffc33 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java @@ -139,8 +139,8 @@ public class JMeterService { JvmInfoDTO jvmInfoDTO = resources.get(index); TestResourceDTO testResource = jvmInfoDTO.getTestResource(); String configuration = testResource.getConfiguration(); - request.setCorePoolSize(MessageCache.corePoolSize); NodeDTO node = JSON.parseObject(configuration, NodeDTO.class); + request.setCorePoolSize(node.getMaxConcurrency()); String nodeIp = node.getIp(); Integer port = node.getPort(); String uri = String.format(BASE_URL + "/jmeter/api/start", nodeIp, port); diff --git a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue index 34b41f173c..82df2a7688 100644 --- a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue +++ b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue @@ -324,16 +324,21 @@ export default { if (data) { this.report = data; if (this.report.reportVersion && this.report.reportVersion > 1) { - if (data.content) { - let report = JSON.parse(data.content); - this.content = report; - this.fullTreeNodes = report.steps; - this.content.console = report.console; - this.content.error = report.error; - this.content.success = (report.total - report.error); - this.totalTime = report.totalTime; + this.report.status = data.status; + if (!this.isNotRunning) { + setTimeout(this.getReport, 2000) + } else { + if (data.content) { + let report = JSON.parse(data.content); + this.content = report; + this.fullTreeNodes = report.steps; + this.content.console = report.console; + this.content.error = report.error; + this.content.success = (report.total - report.error); + this.totalTime = report.totalTime; + } + this.loading = false; } - this.loading = false; } else { this.buildReport(); } @@ -528,10 +533,12 @@ export default { .report-container .is-active .fail { color: inherit; } + .report-console { height: calc(100vh - 270px); overflow-y: auto; } + .export-button { float: right; } diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue index 24557a1c5c..b57532733a 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue @@ -450,7 +450,9 @@ export default { if (this.planId) { this.$post("/test/plan/scenario/case/run", param, response => { this.runVisible = true; - this.reportId = response.data; + if (response.data && response.data.length > 0) { + this.reportId = response.data[0].reportId; + } }); } if (this.reviewId) {