fix (接口测试):修复快捷调试参数失效问题

This commit is contained in:
fit2-zhao 2021-10-08 16:42:21 +08:00 committed by fit2-zhao
parent 3a3ac3dfa1
commit 08241cb34a
2 changed files with 8 additions and 8 deletions

View File

@ -388,7 +388,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
if (isUrl()) {
if (this.isCustomizeReq()) {
url = this.getUrl();
sampler.setPath(url);
sampler.setProperty("HTTPSampler.path", url);
}
if (StringUtils.isNotEmpty(this.getPort()) && this.getPort().startsWith("${")) {
url = url.replace(this.getPort(), "10990");
@ -403,7 +403,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
sampler.setPort(urlObject.getPort());
}
sampler.setProtocol(urlObject.getProtocol());
sampler.setPath(URLDecoder.decode(URLEncoder.encode(urlObject.getFile(), "UTF-8"), "UTF-8"));
sampler.setProperty("HTTPSampler.path", URLDecoder.decode(URLEncoder.encode(urlObject.getFile(), "UTF-8"), "UTF-8"));
} catch (Exception e) {
LogUtil.error(e.getMessage(), e);
}
@ -433,13 +433,13 @@ public class MsHTTPSamplerProxy extends MsTestElement {
sampler.setDomain(URLDecoder.decode(urlObject.getHost(), "UTF-8"));
sampler.setProtocol(urlObject.getProtocol());
}
sampler.setPath(URLDecoder.decode(URLEncoder.encode(envPath, "UTF-8"), "UTF-8"));
sampler.setProperty("HTTPSampler.path", URLDecoder.decode(URLEncoder.encode(envPath, "UTF-8"), "UTF-8"));
}
}
String envPath = sampler.getPath();
if (CollectionUtils.isNotEmpty(this.getRest()) && this.isRest()) {
envPath = getRestParameters(envPath);
sampler.setPath(envPath);
sampler.setProperty("HTTPSampler.path", envPath);
}
if (CollectionUtils.isNotEmpty(this.getArguments())) {
String path = getPostQueryParameters(envPath);
@ -477,13 +477,13 @@ public class MsHTTPSamplerProxy extends MsTestElement {
}
sampler.setProtocol(urlObject.getProtocol());
String envPath = StringUtils.equals(urlObject.getPath(), "/") ? "" : urlObject.getFile();
sampler.setPath(envPath);
sampler.setProperty("HTTPSampler.path", envPath);
if (CollectionUtils.isNotEmpty(this.getRest()) && this.isRest()) {
envPath = getRestParameters(URLDecoder.decode(URLEncoder.encode(envPath, "UTF-8"), "UTF-8"));
sampler.setPath(envPath);
sampler.setProperty("HTTPSampler.path", envPath);
}
if (CollectionUtils.isNotEmpty(this.getArguments())) {
sampler.setPath(getPostQueryParameters(URLDecoder.decode(URLEncoder.encode(envPath, "UTF-8"), "UTF-8")));
sampler.setProperty("HTTPSampler.path", getPostQueryParameters(URLDecoder.decode(URLEncoder.encode(envPath, "UTF-8"), "UTF-8")));
}
}
} catch (Exception e) {

View File

@ -170,7 +170,7 @@ export default {
//
if (selected !== -1) {
//
this.selectedParent(currentObj)
// this.selectedParent(currentObj)
//
this.uniteChildSame(currentObj, true)
} else {