From 87e76e7c0556b5e9c2948b0cf5d183d010241820 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 24 Apr 2024 15:53:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9B=86=E5=90=88=E5=B9=B6=E8=A1=8C=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E7=BB=9F=E8=AE=A1=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1040000 --user=王孝刚 【接口测试】接口用例集合报告,并行执行时请求统计错误 https://www.tapd.cn/55049933/s/1507969 --- .../api/service/definition/ApiTestCaseBatchRunService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 425c539b5a..78d3ce23c9 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 @@ -198,9 +198,8 @@ public class ApiTestCaseBatchRunService { // 如果是集成报告则生成唯一的虚拟ID,非集成报告使用单用例的报告ID reportId = runModeConfig.isIntegratedReport() ? UUID.randomUUID().toString() : caseReportMap.get(id); - Long requestCount = runModeConfig.isIntegratedReport() ? ids.size() : 1L; TaskRequestDTO taskRequest = getTaskRequestDTO(reportId, apiTestCase, runModeConfig); - taskRequest.setRequestCount(requestCount); + taskRequest.setRequestCount(1L); execute(taskRequest, apiTestCase, apiTestCaseBlob, definitionExecuteInfoMap.get(apiTestCase.getId())); } catch (Exception e) { LogUtils.error("执行用例失败 {}-{}", reportId, id);