fix(接口自动化): 修复headers和请求同名问题
This commit is contained in:
parent
3e616a5ebb
commit
019fa6709a
|
@ -30,7 +30,7 @@ public class MsHeaderManager extends MsTestElement {
|
||||||
public void toHashTree(HashTree tree, List<MsTestElement> hashTree, ParameterConfig config) {
|
public void toHashTree(HashTree tree, List<MsTestElement> hashTree, ParameterConfig config) {
|
||||||
HeaderManager headerManager = new HeaderManager();
|
HeaderManager headerManager = new HeaderManager();
|
||||||
headerManager.setEnabled(this.isEnable());
|
headerManager.setEnabled(this.isEnable());
|
||||||
headerManager.setName(StringUtils.isNotEmpty(this.getName()) ? this.getName() : "HeaderManager");
|
headerManager.setName(StringUtils.isNotEmpty(this.getName()) ? this.getName() + "HeaderManager" : "HeaderManager");
|
||||||
headerManager.setProperty(TestElement.TEST_CLASS, HeaderManager.class.getName());
|
headerManager.setProperty(TestElement.TEST_CLASS, HeaderManager.class.getName());
|
||||||
headerManager.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("HeaderPanel"));
|
headerManager.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("HeaderPanel"));
|
||||||
headers.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->
|
headers.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->
|
||||||
|
|
|
@ -306,7 +306,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
public void setHeader(HashTree tree, List<KeyValue> headers) {
|
public void setHeader(HashTree tree, List<KeyValue> headers) {
|
||||||
HeaderManager headerManager = new HeaderManager();
|
HeaderManager headerManager = new HeaderManager();
|
||||||
headerManager.setEnabled(true);
|
headerManager.setEnabled(true);
|
||||||
headerManager.setName(StringUtils.isNotEmpty(this.getName()) ? this.getName() : "HeaderManager");
|
headerManager.setName(StringUtils.isNotEmpty(this.getName()) ? this.getName() + "HeaderManager" : "HeaderManager");
|
||||||
headerManager.setProperty(TestElement.TEST_CLASS, HeaderManager.class.getName());
|
headerManager.setProperty(TestElement.TEST_CLASS, HeaderManager.class.getName());
|
||||||
headerManager.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("HeaderPanel"));
|
headerManager.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("HeaderPanel"));
|
||||||
headers.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->
|
headers.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->
|
||||||
|
|
Loading…
Reference in New Issue