diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java index 3e194c35dd..240a2783bb 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java @@ -66,7 +66,7 @@ public class MsThreadGroup extends MsTestElement { threadGroup.setDuration(0); threadGroup.setProperty(ThreadGroup.ON_SAMPLE_ERROR, ThreadGroup.ON_SAMPLE_ERROR_CONTINUE); threadGroup.setScheduler(false); - if (onSampleError != null && !onSampleError) { + if (onSampleError != null && onSampleError) { // onSampleError 为true 表示失败停止 threadGroup.setProperty("ThreadGroup.on_sample_error", "stoptest"); } threadGroup.setSamplerController(loopController); diff --git a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java index 49165e9b55..5748cb9541 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java @@ -158,7 +158,7 @@ public class TestPlanController { ApiRunConfigDTO api = new ApiRunConfigDTO(); api.setMode(testplanRunRequest.getMode()); api.setResourcePoolId(testplanRunRequest.getResourcePoolId()); - api.setOnSampleError(true); + api.setOnSampleError(false); // OnSampleError 为false表示失败不停止,若设置为true会导致bug #4809 api.setReportType("iddReport"); String apiRunConfig = JSONObject.toJSONString(api); return testPlanService.run(testplanRunRequest.getTestPlanId(), testplanRunRequest.getProjectId(), testplanRunRequest.getUserId(), testplanRunRequest.getTriggerMode(), apiRunConfig);