Merge branch 'v1.7' of https://github.com/metersphere/metersphere into v1.7
This commit is contained in:
commit
6956f667fa
|
@ -190,15 +190,14 @@ public abstract class MsTestElement {
|
||||||
csvDataSet.setEnabled(true);
|
csvDataSet.setEnabled(true);
|
||||||
csvDataSet.setProperty(TestElement.TEST_CLASS, CSVDataSet.class.getName());
|
csvDataSet.setProperty(TestElement.TEST_CLASS, CSVDataSet.class.getName());
|
||||||
csvDataSet.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
csvDataSet.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||||
csvDataSet.setName(item.getName());
|
csvDataSet.setName(StringUtils.isEmpty(item.getName()) ? "CSVDataSet" : item.getName());
|
||||||
csvDataSet.setProperty("fileEncoding", item.getEncoding());
|
csvDataSet.setProperty("fileEncoding", StringUtils.isEmpty(item.getEncoding()) ? "UTF-8" : item.getEncoding());
|
||||||
csvDataSet.setProperty("variableNames", item.getName());
|
|
||||||
if (CollectionUtils.isNotEmpty(item.getFiles())) {
|
if (CollectionUtils.isNotEmpty(item.getFiles())) {
|
||||||
csvDataSet.setProperty("filename", BODY_FILE_DIR + "/" + item.getFiles().get(0).getId() + "_" + item.getFiles().get(0).getName());
|
csvDataSet.setProperty("filename", BODY_FILE_DIR + "/" + item.getFiles().get(0).getId() + "_" + item.getFiles().get(0).getName());
|
||||||
}
|
}
|
||||||
csvDataSet.setIgnoreFirstLine(false);
|
csvDataSet.setIgnoreFirstLine(false);
|
||||||
csvDataSet.setProperty("delimiter", item.getDelimiter());
|
csvDataSet.setProperty("delimiter", item.getDelimiter());
|
||||||
csvDataSet.setComment(item.getDescription());
|
csvDataSet.setComment(StringUtils.isEmpty(item.getDescription()) ? "" : item.getDescription());
|
||||||
tree.add(csvDataSet);
|
tree.add(csvDataSet);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -220,7 +219,7 @@ public abstract class MsTestElement {
|
||||||
counterConfig.setVarName(item.getName());
|
counterConfig.setVarName(item.getName());
|
||||||
counterConfig.setIncrement(item.getIncrement());
|
counterConfig.setIncrement(item.getIncrement());
|
||||||
counterConfig.setFormat(item.getValue());
|
counterConfig.setFormat(item.getValue());
|
||||||
counterConfig.setComment(item.getDescription());
|
counterConfig.setComment(StringUtils.isEmpty(item.getDescription()) ? "" : item.getDescription());
|
||||||
tree.add(counterConfig);
|
tree.add(counterConfig);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,13 +79,13 @@ public class MsIfController extends MsTestElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.equals(operator, "is empty")) {
|
if (StringUtils.equals(operator, "is empty")) {
|
||||||
variable = "empty(" + variable + ")";
|
variable = "!empty(" + variable + ")";
|
||||||
operator = "";
|
operator = "";
|
||||||
value = "";
|
value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.equals(operator, "is not empty")) {
|
if (StringUtils.equals(operator, "is not empty")) {
|
||||||
variable = "!empty(" + variable + ")";
|
variable = "empty(" + variable + ")";
|
||||||
operator = "";
|
operator = "";
|
||||||
value = "";
|
value = "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,13 +123,13 @@ public class MsLoopController extends MsTestElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.equals(operator, "is empty")) {
|
if (StringUtils.equals(operator, "is empty")) {
|
||||||
variable = "empty(" + variable + ")";
|
variable = "!empty(" + variable + ")";
|
||||||
operator = "";
|
operator = "";
|
||||||
value = "";
|
value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.equals(operator, "is not empty")) {
|
if (StringUtils.equals(operator, "is not empty")) {
|
||||||
variable = "!empty(" + variable + ")";
|
variable = "empty(" + variable + ")";
|
||||||
operator = "";
|
operator = "";
|
||||||
value = "";
|
value = "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -507,7 +507,6 @@ public class ApiAutomationService {
|
||||||
ParameterConfig config = new ParameterConfig();
|
ParameterConfig config = new ParameterConfig();
|
||||||
config.setConfig(envConfig);
|
config.setConfig(envConfig);
|
||||||
HashTree hashTree = request.getTestElement().generateHashTree(config);
|
HashTree hashTree = request.getTestElement().generateHashTree(config);
|
||||||
|
|
||||||
// 调用执行方法
|
// 调用执行方法
|
||||||
createScenarioReport(request.getId(), request.getScenarioId(), request.getScenarioName(), ReportTriggerMode.MANUAL.name(), request.getExecuteType(), request.getProjectId(),
|
createScenarioReport(request.getId(), request.getScenarioId(), request.getScenarioName(), ReportTriggerMode.MANUAL.name(), request.getExecuteType(), request.getProjectId(),
|
||||||
SessionUtils.getUserId());
|
SessionUtils.getUserId());
|
||||||
|
|
Loading…
Reference in New Issue