fix(接口测试): 修复集合并行报告统计计算错误的缺陷

--bug=1040000 --user=王孝刚 【接口测试】接口用例集合报告,并行执行时请求统计错误
https://www.tapd.cn/55049933/s/1507969
This commit is contained in:
wxg0103 2024-04-24 15:53:14 +08:00 committed by Craftsman
parent cdd22425e7
commit 87e76e7c05
1 changed files with 1 additions and 2 deletions

View File

@ -198,9 +198,8 @@ public class ApiTestCaseBatchRunService {
// 如果是集成报告则生成唯一的虚拟ID非集成报告使用单用例的报告ID // 如果是集成报告则生成唯一的虚拟ID非集成报告使用单用例的报告ID
reportId = runModeConfig.isIntegratedReport() ? UUID.randomUUID().toString() : caseReportMap.get(id); reportId = runModeConfig.isIntegratedReport() ? UUID.randomUUID().toString() : caseReportMap.get(id);
Long requestCount = runModeConfig.isIntegratedReport() ? ids.size() : 1L;
TaskRequestDTO taskRequest = getTaskRequestDTO(reportId, apiTestCase, runModeConfig); TaskRequestDTO taskRequest = getTaskRequestDTO(reportId, apiTestCase, runModeConfig);
taskRequest.setRequestCount(requestCount); taskRequest.setRequestCount(1L);
execute(taskRequest, apiTestCase, apiTestCaseBlob, definitionExecuteInfoMap.get(apiTestCase.getId())); execute(taskRequest, apiTestCase, apiTestCaseBlob, definitionExecuteInfoMap.get(apiTestCase.getId()));
} catch (Exception e) { } catch (Exception e) {
LogUtils.error("执行用例失败 {}-{}", reportId, id); LogUtils.error("执行用例失败 {}-{}", reportId, id);