mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-30 11:08:38 +08:00
fix(接口自动化): 修复请求参数问题
This commit is contained in:
parent
84633c80e5
commit
dc6a960dac
@ -83,9 +83,7 @@ public class MsScenario extends MsTestElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 场景变量
|
// 场景变量
|
||||||
if (CollectionUtils.isNotEmpty(this.getVariables())) {
|
tree.add(arguments(config));
|
||||||
tree.add(arguments(config));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(hashTree)) {
|
if (CollectionUtils.isNotEmpty(hashTree)) {
|
||||||
for (MsTestElement el : hashTree) {
|
for (MsTestElement el : hashTree) {
|
||||||
@ -101,9 +99,11 @@ public class MsScenario extends MsTestElement {
|
|||||||
arguments.setName(name + "Variables");
|
arguments.setName(name + "Variables");
|
||||||
arguments.setProperty(TestElement.TEST_CLASS, Arguments.class.getName());
|
arguments.setProperty(TestElement.TEST_CLASS, Arguments.class.getName());
|
||||||
arguments.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("ArgumentsPanel"));
|
arguments.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("ArgumentsPanel"));
|
||||||
variables.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->
|
if (CollectionUtils.isNotEmpty(this.getVariables())) {
|
||||||
arguments.addArgument(keyValue.getName(), keyValue.getValue(), "=")
|
variables.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->
|
||||||
);
|
arguments.addArgument(keyValue.getName(), keyValue.getValue(), "=")
|
||||||
|
);
|
||||||
|
}
|
||||||
if (config != null && config.getConfig() != null && config.getConfig().getCommonConfig() != null
|
if (config != null && config.getConfig() != null && config.getConfig().getCommonConfig() != null
|
||||||
&& CollectionUtils.isNotEmpty(config.getConfig().getCommonConfig().getVariables())) {
|
&& CollectionUtils.isNotEmpty(config.getConfig().getCommonConfig().getVariables())) {
|
||||||
config.getConfig().getCommonConfig().getVariables().stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->
|
config.getConfig().getCommonConfig().getVariables().stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->
|
||||||
|
Loading…
Reference in New Issue
Block a user