diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/RunDefinitionRequest.java b/backend/src/main/java/io/metersphere/api/dto/definition/RunDefinitionRequest.java index 8ca56e0aaa..786e6f5c0a 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/RunDefinitionRequest.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/RunDefinitionRequest.java @@ -14,6 +14,8 @@ public class RunDefinitionRequest { private String reportId; + private String runMode; + private boolean isDebug; private boolean saved; diff --git a/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioExecuteService.java b/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioExecuteService.java index f993372ce8..754fdc7e45 100644 --- a/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioExecuteService.java +++ b/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioExecuteService.java @@ -374,9 +374,9 @@ public class ApiScenarioExecuteService { } uploadBodyFiles(request.getBodyFileRequestIds(), bodyFiles); FileUtils.createBodyFiles(request.getScenarioFileIds(), scenarioFiles); - + String runMode = StringUtils.isEmpty(request.getRunMode()) ? ApiRunMode.SCENARIO.name() : request.getRunMode(); // 调用执行方法 - JmeterRunRequestDTO runRequest = new JmeterRunRequestDTO(request.getId(), request.getId(), ApiRunMode.SCENARIO.name(), hashTree); + JmeterRunRequestDTO runRequest = new JmeterRunRequestDTO(request.getId(), request.getId(), runMode, hashTree); runRequest.setDebug(true); jMeterService.run(runRequest); return request.getId(); diff --git a/frontend/src/business/components/api/automation/scenario/DebugRun.vue b/frontend/src/business/components/api/automation/scenario/DebugRun.vue index 9954520769..c4e7756604 100644 --- a/frontend/src/business/components/api/automation/scenario/DebugRun.vue +++ b/frontend/src/business/components/api/automation/scenario/DebugRun.vue @@ -12,6 +12,7 @@ export default { components: {}, props: { environment: Map, + runMode: String, debug: Boolean, reportId: String, runData: Object, @@ -69,7 +70,7 @@ export default { testPlan.hashTree.push(threadGroup); this.sort(testPlan.hashTree); let reqObj = { - id: this.reportId, reportId: this.reportId, scenarioName: this.runData.name, saved: this.saved, + id: this.reportId, reportId: this.reportId, scenarioName: this.runData.name, saved: this.saved, runMode: this.runMode, scenarioId: this.runData.id, testElement: testPlan, projectId: getCurrentProjectID(), environmentMap: strMapToObj(map), environmentType: this.environmentType, environmentGroupId: this.environmentGroupId, environmentJson: JSON.stringify(strMapToObj(map)) }; diff --git a/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue b/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue index c8c91768ca..cb26976a4a 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue @@ -89,16 +89,7 @@