fix(接口调试): 修复调试未勾选参数加入执行缺陷
This commit is contained in:
parent
ea832f6f0e
commit
ce579fe143
|
@ -318,7 +318,7 @@ export class HTTPSamplerArguments extends Element {
|
|||
|
||||
let collectionProp = this.collectionProp('Arguments.arguments');
|
||||
this.args.forEach(arg => {
|
||||
if (arg.enable) { // 非禁用的条件加入执行
|
||||
if (arg.enable === true) { // 非禁用的条件加入执行
|
||||
let elementProp = collectionProp.elementProp(arg.name, 'HTTPArgument');
|
||||
elementProp.boolProp('HTTPArgument.always_encode', arg.encode, true);
|
||||
elementProp.boolProp('HTTPArgument.use_equals', arg.equals, true);
|
||||
|
@ -487,10 +487,9 @@ export class HeaderManager extends DefaultTestElement {
|
|||
this.headers = headers || [];
|
||||
|
||||
let collectionProp = this.collectionProp('HeaderManager.headers');
|
||||
|
||||
this.headers.forEach(header => {
|
||||
let elementProp = collectionProp.elementProp('', 'Header');
|
||||
if (header.enable) {
|
||||
if (header.enable === true) {
|
||||
let elementProp = collectionProp.elementProp('', 'Header');
|
||||
elementProp.stringProp('Header.name', header.name);
|
||||
elementProp.stringProp('Header.value', header.value);
|
||||
}
|
||||
|
@ -499,7 +498,7 @@ export class HeaderManager extends DefaultTestElement {
|
|||
}
|
||||
|
||||
export class DNSCacheManager extends DefaultTestElement {
|
||||
constructor(testName,domain, hosts) {
|
||||
constructor(testName, domain, hosts) {
|
||||
super('DNSCacheManager', 'DNSCachePanel', 'DNSCacheManager', testName);
|
||||
let collectionPropServers = this.collectionProp('DNSCacheManager.servers');
|
||||
let collectionPropHosts = this.collectionProp('DNSCacheManager.hosts');
|
||||
|
@ -524,7 +523,7 @@ export class Arguments extends DefaultTestElement {
|
|||
let collectionProp = this.collectionProp('Arguments.arguments');
|
||||
|
||||
this.args.forEach(arg => {
|
||||
if (arg.enable) { // 非禁用的条件加入执行
|
||||
if (arg.enable === true) { // 非禁用的条件加入执行
|
||||
let elementProp = collectionProp.elementProp(arg.name, 'Argument');
|
||||
elementProp.stringProp('Argument.name', arg.name);
|
||||
elementProp.stringProp('Argument.value', arg.value);
|
||||
|
@ -549,7 +548,7 @@ export class ElementArguments extends Element {
|
|||
let collectionProp = this.collectionProp('Arguments.arguments');
|
||||
if (args) {
|
||||
args.forEach(arg => {
|
||||
if (arg.enable) { // 非禁用的条件加入执行
|
||||
if (arg.enable === true) { // 非禁用的条件加入执行
|
||||
let elementProp = collectionProp.elementProp(arg.name, 'Argument');
|
||||
elementProp.stringProp('Argument.name', arg.name);
|
||||
elementProp.stringProp('Argument.value', arg.value);
|
||||
|
|
|
@ -781,7 +781,7 @@ class JMXHttpRequest {
|
|||
if (this.method.toUpperCase() !== "GET") {
|
||||
let parameters = [];
|
||||
request.parameters.forEach(parameter => {
|
||||
if (parameter.name && parameter.value && parameter.enable) {
|
||||
if (parameter.name && parameter.value && parameter.enable === true) {
|
||||
parameters.push(parameter);
|
||||
}
|
||||
});
|
||||
|
@ -948,8 +948,8 @@ class JMXGenerator {
|
|||
let name = request.name + " DNSCacheManager";
|
||||
let hosts = JSON.parse(request.environment.hosts);
|
||||
if (hosts.length > 0) {
|
||||
let domain = request.environment.protocol+"://"+request.environment.domain;
|
||||
threadGroup.put(new DNSCacheManager(name,domain ,hosts));
|
||||
let domain = request.environment.protocol + "://" + request.environment.domain;
|
||||
threadGroup.put(new DNSCacheManager(name, domain, hosts));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue