fix(接口测试): 修复使用默认生成的Mock环境进行测试时会报错的缺陷
修复使用默认生成的Mock环境进行测试时会报错的缺陷
This commit is contained in:
parent
28027266ab
commit
f3dbe66b63
|
@ -74,17 +74,17 @@ public class JMeterScriptUtil {
|
|||
boolean globalPreScriptIsFilter = JMeterScriptUtil.isScriptFilter(preFilterProtocal, protocal);
|
||||
boolean globalPostScriptIsFilter = JMeterScriptUtil.isScriptFilter(postFilterProtocal, protocal);
|
||||
if (isAfterPrivateScript) {
|
||||
if (isPreScriptExecAfterPrivateScript && !globalPreScriptIsFilter && StringUtils.isNotEmpty(preProcessor.getScript())) {
|
||||
if (isPreScriptExecAfterPrivateScript && !globalPreScriptIsFilter && preProcessor != null && StringUtils.isNotEmpty(preProcessor.getScript())) {
|
||||
addItemHashTree(preProcessor, samplerHashTree, config, environmentId);
|
||||
}
|
||||
if (isPostScriptExecAfterPrivateScript && !globalPostScriptIsFilter && StringUtils.isNotEmpty(postProcessor.getScript())) {
|
||||
if (isPostScriptExecAfterPrivateScript && !globalPostScriptIsFilter && postProcessor != null && StringUtils.isNotEmpty(postProcessor.getScript())) {
|
||||
addItemHashTree(postProcessor, samplerHashTree, config, environmentId);
|
||||
}
|
||||
} else {
|
||||
if (!isPreScriptExecAfterPrivateScript && !globalPreScriptIsFilter && StringUtils.isNotEmpty(preProcessor.getScript())) {
|
||||
if (!isPreScriptExecAfterPrivateScript && !globalPreScriptIsFilter && preProcessor != null && StringUtils.isNotEmpty(preProcessor.getScript())) {
|
||||
addItemHashTree(preProcessor, samplerHashTree, config, environmentId);
|
||||
}
|
||||
if (!isPostScriptExecAfterPrivateScript && !globalPostScriptIsFilter && StringUtils.isNotEmpty(postProcessor.getScript())) {
|
||||
if (!isPostScriptExecAfterPrivateScript && !globalPostScriptIsFilter && postProcessor != null && StringUtils.isNotEmpty(postProcessor.getScript())) {
|
||||
addItemHashTree(postProcessor, samplerHashTree, config, environmentId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue