diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseBatchRunService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseBatchRunService.java index f059ae7bbd..51e2c66ba4 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseBatchRunService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseBatchRunService.java @@ -227,6 +227,7 @@ public class ApiTestCaseBatchRunService { TaskBatchRequestDTO taskRequest = getTaskBatchRequestDTO(request.getProjectId(), runModeConfig); taskRequest.getTaskInfo().setTaskId(execTask.getId()); + taskRequest.getTaskInfo().setUserId(userId); taskRequest.setTaskItems(taskItems); apiExecuteService.batchExecute(taskRequest); });