This commit is contained in:
chenjianxing 2021-02-01 20:07:29 +08:00
commit 6956f667fa
4 changed files with 8 additions and 10 deletions

View File

@ -190,15 +190,14 @@ public abstract class MsTestElement {
csvDataSet.setEnabled(true);
csvDataSet.setProperty(TestElement.TEST_CLASS, CSVDataSet.class.getName());
csvDataSet.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
csvDataSet.setName(item.getName());
csvDataSet.setProperty("fileEncoding", item.getEncoding());
csvDataSet.setProperty("variableNames", item.getName());
csvDataSet.setName(StringUtils.isEmpty(item.getName()) ? "CSVDataSet" : item.getName());
csvDataSet.setProperty("fileEncoding", StringUtils.isEmpty(item.getEncoding()) ? "UTF-8" : item.getEncoding());
if (CollectionUtils.isNotEmpty(item.getFiles())) {
csvDataSet.setProperty("filename", BODY_FILE_DIR + "/" + item.getFiles().get(0).getId() + "_" + item.getFiles().get(0).getName());
}
csvDataSet.setIgnoreFirstLine(false);
csvDataSet.setProperty("delimiter", item.getDelimiter());
csvDataSet.setComment(item.getDescription());
csvDataSet.setComment(StringUtils.isEmpty(item.getDescription()) ? "" : item.getDescription());
tree.add(csvDataSet);
});
}
@ -220,7 +219,7 @@ public abstract class MsTestElement {
counterConfig.setVarName(item.getName());
counterConfig.setIncrement(item.getIncrement());
counterConfig.setFormat(item.getValue());
counterConfig.setComment(item.getDescription());
counterConfig.setComment(StringUtils.isEmpty(item.getDescription()) ? "" : item.getDescription());
tree.add(counterConfig);
});
}

View File

@ -79,13 +79,13 @@ public class MsIfController extends MsTestElement {
}
if (StringUtils.equals(operator, "is empty")) {
variable = "empty(" + variable + ")";
variable = "!empty(" + variable + ")";
operator = "";
value = "";
}
if (StringUtils.equals(operator, "is not empty")) {
variable = "!empty(" + variable + ")";
variable = "empty(" + variable + ")";
operator = "";
value = "";
}

View File

@ -123,13 +123,13 @@ public class MsLoopController extends MsTestElement {
}
if (StringUtils.equals(operator, "is empty")) {
variable = "empty(" + variable + ")";
variable = "!empty(" + variable + ")";
operator = "";
value = "";
}
if (StringUtils.equals(operator, "is not empty")) {
variable = "!empty(" + variable + ")";
variable = "empty(" + variable + ")";
operator = "";
value = "";
}

View File

@ -507,7 +507,6 @@ public class ApiAutomationService {
ParameterConfig config = new ParameterConfig();
config.setConfig(envConfig);
HashTree hashTree = request.getTestElement().generateHashTree(config);
// 调用执行方法
createScenarioReport(request.getId(), request.getScenarioId(), request.getScenarioName(), ReportTriggerMode.MANUAL.name(), request.getExecuteType(), request.getProjectId(),
SessionUtils.getUserId());