From 8f99766fe987431327e9168779b93defb823f03b Mon Sep 17 00:00:00 2001 From: xuwangcheng Date: Thu, 27 Feb 2020 18:15:28 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=9C=A8?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=9B=86=E6=B5=8B=E8=AF=95=E3=80=81=E6=80=A7?= =?UTF-8?q?=E8=83=BD=E6=B5=8B=E8=AF=95=E4=B8=AD=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=B8=AD=E4=BD=BF=E7=94=A8=E4=BA=86=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E6=8E=A5=E5=8F=A3=E5=85=A8=E5=B1=80=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E6=97=B6=E4=BC=9A=E5=87=BA=E7=8E=B0=E6=97=A0=E6=B3=95=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=88=B0=E6=AD=A3=E7=A1=AE=E7=9A=84=E5=80=BC=E5=BE=97?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yi/master/coretest/message/test/MessageAutoTest.java | 8 ++++---- update.md | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/yi/master/coretest/message/test/MessageAutoTest.java b/src/main/java/yi/master/coretest/message/test/MessageAutoTest.java index 2fd1802..d8970ca 100644 --- a/src/main/java/yi/master/coretest/message/test/MessageAutoTest.java +++ b/src/main/java/yi/master/coretest/message/test/MessageAutoTest.java @@ -79,12 +79,12 @@ public class MessageAutoTest { * @throws Exception */ public String dynamicInterfaceGetValue(String sceneId, String systemId, String valueExpression) throws Exception { - //执行测试 TestConfig config = testConfigService.getConfigByUserId(FrameworkUtil.getLoginUser().getUserId()); if (config == null) { config = testConfigService.getConfigByUserId(0); } + MessageScene scene = messageSceneService.get(Integer.valueOf(sceneId)); if (scene == null) { throw new Exception("指定的测试场景不存在或者已被删除,请检查!"); @@ -642,8 +642,7 @@ public class MessageAutoTest { systems.add(singleSystem); } - for (BusinessSystem system:systems) { - + for (BusinessSystem system:systems) { if ((!allSystemsTestFlag && !enableTestSystems.contains(system)) || "1".equals(system.getStatus()) ) { continue; } @@ -706,7 +705,8 @@ public class MessageAutoTest { testScene.setParseUtil(parseUtil); testScene.setBusinessSystem(system); testScene.setConfig(config); - testScene.setCallParameter(PracticalUtils.jsonToMap(msg.getCallParameter())); + //提前在此处替换调用参数中的全局变量,防止在异步线程中调用时出现一些不可预期的错误 + testScene.setCallParameter(PracticalUtils.jsonToMap(PracticalUtils.replaceGlobalVariable(msg.getCallParameter(), null))); testObjects.add(testScene); } } diff --git a/update.md b/update.md index cda44c7..b9f1f6f 100644 --- a/update.md +++ b/update.md @@ -1,9 +1,10 @@ ### v1.0.3 -#### 2020.2.5 +#### 2020.2.20 - 更新:单个场景调试时可自定义报文内容; - 修复:HTTP请求时返回302状态时报错的问题;(未测试) - 新增:集成swagger4j,可查看api文档,使用方法:修改swagger.properties中disabled=false,启动项目打开http://localhost:8080/doc/index.html,api注解使用请参考https://github.com/cpjit/swagger - 更新:生成接口文档时指定名称修改为英文,防止某些Linux服务器上出现文件名中文乱码的文件; +- 修复:在测试集测试、性能测试中,如果接口中使用了动态接口全局变量时会出现无法获取到正确的值得错误; ### v1.0.2 -- Gitee From bad519e20a62855e0ca0042a122accdb1e0913af Mon Sep 17 00:00:00 2001 From: xuwangcheng Date: Thu, 27 Feb 2020 18:35:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=8F=98=E9=87=8F=E5=9C=A8=E7=BC=96=E8=BE=91=E6=97=B6?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/js/dcits.js | 2 +- src/main/webapp/resource/setting/variable.js | 13 ++++++++----- update.md | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/js/dcits.js b/src/main/webapp/js/dcits.js index c4652ed..993faed 100644 --- a/src/main/webapp/js/dcits.js +++ b/src/main/webapp/js/dcits.js @@ -818,7 +818,7 @@ function ObjectEditPage(id, ajaxUrl, callback) { */ function iterObj(jsonObj, parentName) { $.each(jsonObj, function(k, v) { - if (parentName != null&&parentName != "") { + if (parentName != null && parentName != "") { k = parentName + "\\." + k; } if (!(v instanceof Object)) { diff --git a/src/main/webapp/resource/setting/variable.js b/src/main/webapp/resource/setting/variable.js index a61fefc..f1a59b6 100644 --- a/src/main/webapp/resource/setting/variable.js +++ b/src/main/webapp/resource/setting/variable.js @@ -697,23 +697,23 @@ function changeFormByVariableType (variableType) { case "relatedKeyWord": case "setRuntimeSetting": case "dynamicInterface": - showOrHideInput('hidden', 'button', 'hidden', ''); + showOrHideInput('hidden', 'button', 'hidden', null); break; case "dbSql": case "datetime": case "randomNum": case "randomString": case "uuid": - showOrHideInput('hidden', 'button', 'hidden', ''); + showOrHideInput('hidden', 'button', 'hidden', null); break; case "currentTimestamp": showOrHideInput('hidden', 'hidden', 'hidden', ' '); break; case "constant": - showOrHideInput('text', 'hidden', 'hidden', ''); + showOrHideInput('text', 'hidden', 'hidden', null); break; case "fileParameter": - showOrHideInput('hidden', 'hidden', 'button', ''); + showOrHideInput('hidden', 'hidden', 'button', null); break; default: break; @@ -736,7 +736,10 @@ function showOrHideInput(value_type, settingButton_type, uploadButton_type, valu } else { $("#upload-file").prev('span').remove(); } - $("#value").val(value); + if (value != null) { + $("#value").val(value); + } + } /** diff --git a/update.md b/update.md index b9f1f6f..51f07a4 100644 --- a/update.md +++ b/update.md @@ -5,6 +5,7 @@ - 新增:集成swagger4j,可查看api文档,使用方法:修改swagger.properties中disabled=false,启动项目打开http://localhost:8080/doc/index.html,api注解使用请参考https://github.com/cpjit/swagger - 更新:生成接口文档时指定名称修改为英文,防止某些Linux服务器上出现文件名中文乱码的文件; - 修复:在测试集测试、性能测试中,如果接口中使用了动态接口全局变量时会出现无法获取到正确的值得错误; +- 修复:全局变量在编辑时无法显示正确的配置的问题。 ### v1.0.2 -- Gitee From 44d5501fb867ac47dda2c719b87c5a12e9d8c853 Mon Sep 17 00:00:00 2001 From: xuwangcheng Date: Thu, 27 Feb 2020 18:38:14 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=88=B01.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/yi/master/constant/SystemConsts.java | 2 +- src/main/java/yi/master/listener/VersionUpdateUtil.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/yi/master/constant/SystemConsts.java b/src/main/java/yi/master/constant/SystemConsts.java index d2464e5..5234f36 100644 --- a/src/main/java/yi/master/constant/SystemConsts.java +++ b/src/main/java/yi/master/constant/SystemConsts.java @@ -13,7 +13,7 @@ public interface SystemConsts { /** * 当前版本号 */ - String VERSION = "1.0.2"; + String VERSION = "1.0.3"; /** diff --git a/src/main/java/yi/master/listener/VersionUpdateUtil.java b/src/main/java/yi/master/listener/VersionUpdateUtil.java index 6061a0e..c66b7e3 100644 --- a/src/main/java/yi/master/listener/VersionUpdateUtil.java +++ b/src/main/java/yi/master/listener/VersionUpdateUtil.java @@ -48,6 +48,7 @@ public class VersionUpdateUtil { ALL_VERSION_LIST.add("1.0.0"); ALL_VERSION_LIST.add("1.0.1"); ALL_VERSION_LIST.add("1.0.2"); + ALL_VERSION_LIST.add("1.0.3"); } /** -- Gitee