Merge remote-tracking branch 'origin/v1.7' into v1.7

This commit is contained in:
wenyann 2021-01-29 11:54:27 +08:00
commit f90778db22
1 changed files with 13 additions and 17 deletions

View File

@ -256,25 +256,21 @@ public abstract class MsTestElement {
return getRootParent(element.getParent());
}
protected String getParentName(MsTestElement element, ParameterConfig config) {
if (element != null) {
MsTestElement parent = this.getRootParent(element);
if (parent != null) {
if (MsTestElementConstants.LoopController.name().equals(parent.getType())) {
MsLoopController loopController = (MsLoopController) parent;
if (StringUtils.equals(loopController.getLoopType(), LoopConstants.WHILE.name()) && loopController.getWhileController() != null) {
return "While 循环-" + "${LoopCounterConfigXXX}";
}
if (StringUtils.equals(loopController.getLoopType(), LoopConstants.FOREACH.name()) && loopController.getForEachController() != null) {
return "ForEach 循环-" + "${LoopCounterConfigXXX}";
}
if (StringUtils.equals(loopController.getLoopType(), LoopConstants.LOOP_COUNT.name()) && loopController.getCountController() != null) {
return "次数循环-" + "${LoopCounterConfigXXX}";
}
protected String getParentName(MsTestElement parent, ParameterConfig config) {
if (parent != null) {
if (MsTestElementConstants.LoopController.name().equals(parent.getType())) {
MsLoopController loopController = (MsLoopController) parent;
if (StringUtils.equals(loopController.getLoopType(), LoopConstants.WHILE.name()) && loopController.getWhileController() != null) {
return "While 循环-" + "${LoopCounterConfigXXX}";
}
if (StringUtils.equals(loopController.getLoopType(), LoopConstants.FOREACH.name()) && loopController.getForEachController() != null) {
return "ForEach 循环-" + "${LoopCounterConfigXXX}";
}
if (StringUtils.equals(loopController.getLoopType(), LoopConstants.LOOP_COUNT.name()) && loopController.getCountController() != null) {
return "次数循环-" + "${LoopCounterConfigXXX}";
}
return parent.getName();
}
return element.getName();
return parent.getName();
} else if (config != null && StringUtils.isNotEmpty(config.getStep())) {
if (MsTestElementConstants.SCENARIO.name().equals(config.getStepType())) {
return config.getStep();