From 6c38dc571c044a48ee7b7a6dfc19ff913fe2691d Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Wed, 22 Dec 2021 15:39:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=89=A7=E8=A1=8C):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8DTCP=E8=AF=B7=E6=B1=82=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=85=A8=E5=B1=80=E5=89=8D=E5=90=8E=E7=BD=AE?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009114 --user=宋天阳 【接口测试】tcp接口添加全局前置脚本,脚本不执行 https://www.tapd.cn/55049933/s/1085014 --- .../metersphere/api/dto/definition/parse/JMeterScriptUtil.java | 2 +- .../api/dto/definition/request/sampler/MsTCPSampler.java | 2 +- frontend/src/common/js/default-table-header.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/parse/JMeterScriptUtil.java b/backend/src/main/java/io/metersphere/api/dto/definition/parse/JMeterScriptUtil.java index 22b132536e..4e9f4be3f1 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/parse/JMeterScriptUtil.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/parse/JMeterScriptUtil.java @@ -86,7 +86,7 @@ public class JMeterScriptUtil { private static void addItemHashTree(MsTestElement element, HashTree samplerHashTree, ParameterConfig config, String enviromentId) { if (element != null && element.getEnvironmentId() == null) { element.setEnvironmentId(enviromentId); - element.toHashTree(samplerHashTree, element.getHashTree(), config); } + element.toHashTree(samplerHashTree, element.getHashTree(), config); } } diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsTCPSampler.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsTCPSampler.java index 82b6c52f23..3d79dd00b4 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsTCPSampler.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsTCPSampler.java @@ -164,7 +164,7 @@ public class MsTCPSampler extends MsTestElement { }); } //根据配置将脚本放置在私有脚本之后 - JMeterScriptUtil.setScript(envConfig, samplerHashTree, GlobalScriptFilterRequest.TCP.name(), enviromentId, config, false); + JMeterScriptUtil.setScript(envConfig, samplerHashTree, GlobalScriptFilterRequest.TCP.name(), enviromentId, config, true); } private void addItemHashTree(MsTestElement element, HashTree samplerHashTree, ParameterConfig config) { diff --git a/frontend/src/common/js/default-table-header.js b/frontend/src/common/js/default-table-header.js index 298c80fb9f..d0bec2da58 100644 --- a/frontend/src/common/js/default-table-header.js +++ b/frontend/src/common/js/default-table-header.js @@ -189,7 +189,7 @@ export let CUSTOM_TABLE_HEADER = { {id: 'createUser', key: '7', label: 'commons.create_user'}, {id: 'createTime', key: '8', label: 'commons.create_time'}, {id: 'desc', key: '9', label: 'test_track.case.case_desc'}, - {id: 'lastExecResult', key: '10', label: 'test_track.plan_view.execute_result'}, + {id: 'lastExecResult', key: '0', label: 'test_track.plan_view.execute_result'}, ], //缺陷列表 ISSUE_LIST: [