fix(接口自动化) 修复场景步骤中路径包含变量问题
--bug=1006790 --user=赵勇 【github#6169】接口自动化导入的jmx中自定义请求端口参数解析出错 https://www.tapd.cn/55049933/s/1049336
This commit is contained in:
parent
35a8536d90
commit
a744b6a2c5
|
@ -394,7 +394,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
|||
sampler.setPath(url);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(this.getPort()) && this.getPort().startsWith("${")) {
|
||||
url = url.replaceAll(this.getPort(), "10990");
|
||||
url = url.replace(this.getPort(), "10990");
|
||||
}
|
||||
try {
|
||||
URL urlObject = new URL(url);
|
||||
|
@ -465,7 +465,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
|||
url = "http://" + url;
|
||||
}
|
||||
if (StringUtils.isNotEmpty(this.getPort()) && this.getPort().startsWith("${")) {
|
||||
url = url.replaceAll(this.getPort(), "10990");
|
||||
url = url.replace(this.getPort(), "10990");
|
||||
}
|
||||
if (url == null) {
|
||||
MSException.throwException("请重新选择环境");
|
||||
|
|
Loading…
Reference in New Issue