diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/controller/MsLoopController.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/controller/MsLoopController.java index 5864f2fa43..c0a07e3fbf 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/controller/MsLoopController.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/controller/MsLoopController.java @@ -106,7 +106,9 @@ public class MsLoopController extends MsTestElement { loopController.setProperty(TestElement.TEST_CLASS, LoopController.class.getName()); loopController.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("LoopControlPanel")); loopController.setLoops(countController.getLoops()); - loopController.setContinueForever(false); + if (countController.getLoops() > 0) { + loopController.setContinueForever(true); + } return loopController; }