From 52ed72a69abb7d3105741420ebe0e44d32faf4c8 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 25 Jul 2023 15:31:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B9=B6=E8=A1=8C=E6=8E=A7=E5=88=B6=E5=99=A8?= =?UTF-8?q?=E4=B8=8B=E6=97=A0=E6=AD=A5=E9=AA=A4=E6=97=B6=EF=BC=8C=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1028109 --user=王孝刚 【接口测试】场景-并行控制器下无步骤-生成报告-步骤显示、状态问题 https://www.tapd.cn/55049933/s/1397088 --- .../scenario/ApiScenarioReportStructureService.java | 3 +++ .../src/business/automation/report/ApiReportDetail.vue | 7 +++++-- .../automation/report/components/RequestResult.vue | 6 +++--- .../frontend/src/business/automation/scenario/Setting.js | 1 - 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportStructureService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportStructureService.java index 57f07cb8d3..6dac9ca643 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportStructureService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportStructureService.java @@ -663,6 +663,9 @@ public class ApiScenarioReportStructureService { allUnExecute.set(allUnExecute.longValue() + 1); } } + if (step.getValue() == null && StringUtils.equals(step.getType(), "GenericController") && StringUtils.equalsIgnoreCase(step.getTotalStatus(), ApiReportStatus.PENDING.name())) { + allUnExecute.set(allUnExecute.longValue() + 1); + } if (CollectionUtils.isNotEmpty(step.getChildren())) { this.countAllUnexpected(step.getChildren(), allUnExecute); } diff --git a/api-test/frontend/src/business/automation/report/ApiReportDetail.vue b/api-test/frontend/src/business/automation/report/ApiReportDetail.vue index 24145f2e6d..611df53b05 100644 --- a/api-test/frontend/src/business/automation/report/ApiReportDetail.vue +++ b/api-test/frontend/src/business/automation/report/ApiReportDetail.vue @@ -244,9 +244,9 @@ export default { filterNodes(node, status) { if (status === 'ERROR' || status === 'FAKE_ERROR' || status === 'UN_EXECUTE') { let data = { ...node }; - if (!data.value && (!data.children || data.children.length === 0)) { + /*if (!data.value && (!data.children || data.children.length === 0)) { return null; - } + }*/ if (data.children.length > 0) { let filteredChildren = []; for (let i = 0; i < data.children.length; i++) { @@ -271,6 +271,9 @@ export default { if (data.type === 'IfController' && data.totalStatus === 'PENDING') { return data; } + if (data.type === 'GenericController' && data.totalStatus === 'PENDING') { + return data; + } } else if (status === 'ERROR') { if (data.totalStatus !== 'FAKE_ERROR' && data.value && data.value.error > 0) { return data; diff --git a/api-test/frontend/src/business/automation/report/components/RequestResult.vue b/api-test/frontend/src/business/automation/report/components/RequestResult.vue index c311e1580a..244dfb5d93 100644 --- a/api-test/frontend/src/business/automation/report/components/RequestResult.vue +++ b/api-test/frontend/src/business/automation/report/components/RequestResult.vue @@ -164,9 +164,9 @@ export default { request: { deep: true, handler(n) { - if (this.request.errorCode) { + if (this.request && this.request.errorCode) { this.baseErrorCode = this.request.errorCode; - } else if (this.request.attachInfoMap && this.request.attachInfoMap.FAKE_ERROR) { + } else if (this.request && this.request.attachInfoMap && this.request.attachInfoMap.FAKE_ERROR) { if (this.request.attachInfoMap.FAKE_ERROR !== '') { this.baseErrorCode = this.request.attachInfoMap.FAKE_ERROR; } @@ -207,7 +207,7 @@ export default { element.parentNode.removeChild(element); }, loadRequestInfoExpand() { - if ( + if ( this.request && !this.request.responseResult || this.request.responseResult.body === null || this.request.responseResult.body === undefined diff --git a/api-test/frontend/src/business/automation/scenario/Setting.js b/api-test/frontend/src/business/automation/scenario/Setting.js index 59be25f99d..613beac93f 100644 --- a/api-test/frontend/src/business/automation/scenario/Setting.js +++ b/api-test/frontend/src/business/automation/scenario/Setting.js @@ -55,7 +55,6 @@ export function STEP() { [ 'AllSamplerProxy', [ - 'GenericController', 'HTTPSamplerProxy', 'DubboSampler', 'JDBCSampler',