fix(接口测试): 修复接口/用例 环境模块匹配错误问题。
This commit is contained in:
parent
3d3b87949e
commit
16ac406fbd
|
@ -398,6 +398,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载SSL认证
|
* 加载SSL认证
|
||||||
|
*
|
||||||
* @param config
|
* @param config
|
||||||
* @param httpSamplerTree
|
* @param httpSamplerTree
|
||||||
* @return
|
* @return
|
||||||
|
@ -454,6 +455,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义请求如果是完整url时不拼接mock信息
|
* 自定义请求如果是完整url时不拼接mock信息
|
||||||
|
*
|
||||||
* @param url
|
* @param url
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -622,12 +624,14 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (item.getType().equals(ConditionType.MODULE.name())) {
|
} else if (item.getType().equals(ConditionType.MODULE.name())) {
|
||||||
ApiDefinition apiDefinition;
|
ApiDefinition apiDefinition = null;
|
||||||
ApiDefinitionService apiDefinitionService = CommonBeanFactory.getBean(ApiDefinitionService.class);
|
ApiDefinitionService apiDefinitionService = CommonBeanFactory.getBean(ApiDefinitionService.class);
|
||||||
ApiTestCaseService apiTestCaseService = CommonBeanFactory.getBean(ApiTestCaseService.class);
|
ApiTestCaseService apiTestCaseService = CommonBeanFactory.getBean(ApiTestCaseService.class);
|
||||||
if (StringUtils.isNotEmpty(this.getReferenced()) && this.getReferenced().equals("REF") && StringUtils.isNotEmpty(this.getRefType()) && this.getRefType().equals("CASE")) {
|
if (StringUtils.isNotEmpty(this.getRefType()) && this.getRefType().equals("CASE")) {
|
||||||
ApiTestCaseWithBLOBs caseWithBLOBs = apiTestCaseService.get(this.getId());
|
ApiTestCaseWithBLOBs caseWithBLOBs = apiTestCaseService.get(this.getId());
|
||||||
|
if (caseWithBLOBs != null) {
|
||||||
apiDefinition = apiDefinitionService.get(caseWithBLOBs.getApiDefinitionId());
|
apiDefinition = apiDefinitionService.get(caseWithBLOBs.getApiDefinitionId());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
apiDefinition = apiDefinitionService.get(this.getId());
|
apiDefinition = apiDefinitionService.get(this.getId());
|
||||||
if (apiDefinition == null) {
|
if (apiDefinition == null) {
|
||||||
|
|
Loading…
Reference in New Issue