fix(接口测试): 修复导入jmx自定义请求环境校验错误问题
--bug=1013259 --user=赵勇 接口测试-接口自动化导入jmx文件,导入生成的自定义请求中已包含域名,在场景调试时无需选择环境 https://www.tapd.cn/55049933/s/1160003
This commit is contained in:
parent
bdfe33b33f
commit
7df2186a95
|
@ -133,11 +133,15 @@ public class ApiScenarioEnvService {
|
|||
if (StringUtils.equals(testElement.getType(), "HTTPSamplerProxy")) {
|
||||
// 校验是否是全路径
|
||||
MsHTTPSamplerProxy httpSamplerProxy = (MsHTTPSamplerProxy) testElement;
|
||||
if (!StringUtils.equalsIgnoreCase(httpSamplerProxy.getReferenced(), "Created") || (httpSamplerProxy.getIsRefEnvironment() != null &&
|
||||
if (httpSamplerProxy.isCustomizeReq()) {
|
||||
env.getProjectIds().add(httpSamplerProxy.getProjectId());
|
||||
env.setFullUrl(httpSamplerProxy.getIsRefEnvironment() == null ? true : httpSamplerProxy.getIsRefEnvironment());
|
||||
} else if (!StringUtils.equalsIgnoreCase(httpSamplerProxy.getReferenced(), "Created") || (httpSamplerProxy.getIsRefEnvironment() != null &&
|
||||
httpSamplerProxy.getIsRefEnvironment())) {
|
||||
env.getProjectIds().add(httpSamplerProxy.getProjectId());
|
||||
env.setFullUrl(httpSamplerProxy.getIsRefEnvironment() == null ? true : false);
|
||||
env.setFullUrl(false);
|
||||
}
|
||||
|
||||
} else if (StringUtils.equals(testElement.getType(), "JDBCSampler") || StringUtils.equals(testElement.getType(), "TCPSampler")) {
|
||||
env.getProjectIds().add(testElement.getProjectId());
|
||||
env.setFullUrl(false);
|
||||
|
|
Loading…
Reference in New Issue