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