feat(性能测试): 支持选择线程组
This commit is contained in:
parent
7599c4c5fc
commit
53f173305c
|
@ -649,6 +649,25 @@ public class JmeterDocumentParser implements DocumentParser {
|
|||
((List<?>) holds).remove(0);
|
||||
hold = o.toString();
|
||||
}
|
||||
Object deleteds = context.getProperty("deleted");
|
||||
String deleted = "false";
|
||||
if (deleteds instanceof List) {
|
||||
Object o = ((List<?>) deleteds).get(0);
|
||||
((List<?>) deleteds).remove(0);
|
||||
deleted = o.toString();
|
||||
}
|
||||
Object enableds = context.getProperty("enabled");
|
||||
String enabled = "true";
|
||||
if (enableds instanceof List) {
|
||||
Object o = ((List<?>) enableds).get(0);
|
||||
((List<?>) enableds).remove(0);
|
||||
enabled = o.toString();
|
||||
}
|
||||
|
||||
threadGroup.setAttribute("enabled", enabled);
|
||||
if (BooleanUtils.toBoolean(deleted)) {
|
||||
threadGroup.setAttribute("enabled", "false");
|
||||
}
|
||||
Element elementProp = document.createElement("elementProp");
|
||||
elementProp.setAttribute("name", "ThreadGroup.main_controller");
|
||||
elementProp.setAttribute("elementType", "LoopController");
|
||||
|
|
Loading…
Reference in New Issue