解决迭代次数为0时问题

This commit is contained in:
liangdaliang
2025-06-23 16:55:11 +08:00
parent f8b935378f
commit ca1e8182db

View File

@@ -318,6 +318,9 @@ public class JMeterGroupUtil {
loopController.setProperty(new StringProperty(TestElement.TEST_CLASS, LoopController.class.getName()));
loopController.setProperty(new StringProperty(TestElement.NAME, "循环控制器"));
loopController.setProperty(new BooleanProperty(TestElement.ENABLED, true));
if (loops == 0) {
loops = 1;
}
loopController.setProperty(new IntegerProperty(LoopController.LOOPS, loops));
return loopController;
}