From 8b2041bbd958df26ef03176319154e46802a8f31 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Tue, 11 Aug 2020 10:05:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E8=AF=B7=E6=B1=82Headers=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/api/test/model/ScenarioModel.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index a990906ade..e970b99ceb 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -871,6 +871,9 @@ class JMXGenerator { this.addEnvironments(environment.headers, scenario.headers) } let headers = this.filterKV(scenario.headers); + headers.forEach(h => { + h.value = calculate(h.value); + }); if (headers.length > 0) { let name = scenario.name + " Headers" threadGroup.put(new HeaderManager(name, headers)); @@ -881,6 +884,9 @@ class JMXGenerator { let name = request.name + " Headers"; this.addBodyFormat(request); let headers = this.filterKV(request.headers); + headers.forEach(h => { + h.value = calculate(h.value); + }); if (headers.length > 0) { httpSamplerProxy.put(new HeaderManager(name, headers)); } From 2f1b8e9d1a6cc20cf4c83af1c54813e27136fcf4 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Tue, 11 Aug 2020 10:22:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E8=AF=B7=E6=B1=82body=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/api/test/model/ScenarioModel.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index e970b99ceb..715d08df44 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -937,6 +937,9 @@ class JMXGenerator { let body = []; if (request.body.isKV()) { body = this.filterKV(request.body.kvs); + body.forEach(arg => { + arg.value = calculate(arg.value); + }); } else { httpSamplerProxy.boolProp('HTTPSampler.postBodyRaw', true); body.push({name: '', value: request.body.raw, encode: false});