fix(接口自动化): 执行结果处理

This commit is contained in:
fit2-zhao 2021-02-01 18:18:08 +08:00
parent 384711ee8b
commit a5cb70ba08
2 changed files with 14 additions and 2 deletions

View File

@ -42,10 +42,10 @@ public class MsIfController extends MsTestElement {
private IfController ifController() {
IfController ifController = new IfController();
ifController.setEnabled(true);
ifController.setName(this.getLabelName());
ifController.setCondition(this.getCondition());
ifController.setName(StringUtils.isEmpty(this.getName()) ? "IfController" : this.getName());
ifController.setProperty(TestElement.TEST_CLASS, IfController.class.getName());
ifController.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("IfControllerPanel"));
ifController.setCondition(this.getCondition());
ifController.setEvaluateAll(false);
ifController.setUseExpression(true);
return ifController;

View File

@ -60,6 +60,18 @@ public class TestResult {
item.getSubRequestResults().forEach(subItem -> {
subItem.setName(item.getName());
});
} else {
if (requestResultMap.containsKey(result.getName())) {
requestResultMap.get(result.getName()).add(item);
} else {
List<RequestResult> requestResults = new LinkedList<>();
requestResults.add(item);
requestResultMap.put(result.getName(), requestResults);
}
item.getSubRequestResults().forEach(subItem -> {
subItem.setName(item.getName());
});
}
});
}