fix(接口自动化): 修复headers和请求同名问题

This commit is contained in:
fit2-zhao 2021-03-08 13:30:12 +08:00
parent 3e616a5ebb
commit 019fa6709a
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ public class MsHeaderManager extends MsTestElement {
public void toHashTree(HashTree tree, List<MsTestElement> hashTree, ParameterConfig config) {
HeaderManager headerManager = new HeaderManager();
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.GUI_CLASS, SaveService.aliasToClass("HeaderPanel"));
headers.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->

View File

@ -306,7 +306,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
public void setHeader(HashTree tree, List<KeyValue> headers) {
HeaderManager headerManager = new HeaderManager();
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.GUI_CLASS, SaveService.aliasToClass("HeaderPanel"));
headers.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->