fix(接口测试): 修复TCP配置被场景配置覆盖的bug

This commit is contained in:
q4speed 2020-10-13 11:17:35 +08:00
parent fea3738797
commit c13baa2f70
1 changed files with 12 additions and 1 deletions

View File

@ -1052,10 +1052,21 @@ class JMXTCPRequest {
obj.set(scenario.environment.config.tcpConfig, true);
return obj;
}
obj.set(scenario.tcpConfig, true);
this.copy(this, scenario.tcpConfig);
return obj;
}
copy(target, source) {
for (let key in source) {
if (source.hasOwnProperty(key)) {
if (source[key] !== undefined && !target[key]) {
target[key] = source[key];
}
}
}
}
}
class JMeterTestPlan extends Element {