fix(接口测试): 修复query参数未拼接到url问题
--bug=1011784 --user=赵勇 【接口测试】场景-自定义请求,使用变量作为域名的时候,query参数拼不上 https://www.tapd.cn/55049933/s/1127331
This commit is contained in:
parent
ab31ec2fe9
commit
76409e31b7
|
@ -466,12 +466,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
sampler.setProperty("HTTPSampler.path", envPath);
|
sampler.setProperty("HTTPSampler.path", envPath);
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(this.getArguments())) {
|
if (CollectionUtils.isNotEmpty(this.getArguments())) {
|
||||||
String path = envPath;
|
String path = postQueryParameters(envPath);
|
||||||
if (StringUtils.equalsIgnoreCase(this.getMethod(), "GET")) {
|
|
||||||
getQueryParameters(sampler);
|
|
||||||
} else {
|
|
||||||
path = postQueryParameters(envPath);
|
|
||||||
}
|
|
||||||
if (HTTPConstants.DELETE.equals(this.getMethod()) && !path.startsWith("${")) {
|
if (HTTPConstants.DELETE.equals(this.getMethod()) && !path.startsWith("${")) {
|
||||||
if (!path.startsWith("/")) {
|
if (!path.startsWith("/")) {
|
||||||
path = "/" + path;
|
path = "/" + path;
|
||||||
|
|
Loading…
Reference in New Issue