From b8135f444ae4b54bbf0b86eef6d430fbd4456630 Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Thu, 15 Aug 2024 11:27:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20js?= =?UTF-8?q?on=E8=AF=B7=E6=B1=82=E4=BD=93=E5=A1=AB=E5=86=99=E5=A4=9A?= =?UTF-8?q?=E4=B8=AAjmeter=E5=87=BD=E6=95=B0=EF=BC=8C=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1044699 --user=陈建星 【接口测试】接口用例中使用jmeter随机生成字符串函数创建多个用户(MSv3的创建用户接口)失败了 https://www.tapd.cn/55049933/s/1563142 --- .../metersphere/api/parser/jmeter/body/MsJsonBodyConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/body/MsJsonBodyConverter.java b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/body/MsJsonBodyConverter.java index 3e7e6ff101..6c5723ac1e 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/body/MsJsonBodyConverter.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/body/MsJsonBodyConverter.java @@ -128,7 +128,7 @@ public class MsJsonBodyConverter extends MsBodyConverter { * @return */ protected String replaceMockComma(String text) { - String pattern = "\\$\\{__Mock\\((.+)\\)\\}"; + String pattern = "\\$\\{__Mock\\((.+?)\\)\\}"; Pattern regex = Pattern.compile(pattern); Matcher matcher = regex.matcher(text); while (matcher.find()) {