fix(接口自动化): 集合报告场景ID过长处理 #1005119

--bug=1005119 --user=赵勇 【github#4596】批量运... https://www.tapd.cn/55049933/s/1025349
This commit is contained in:
fit2-zhao 2021-07-14 15:07:30 +08:00 committed by fit2-zhao
parent 4279d5933b
commit 66ea9164e1
1 changed files with 3 additions and 0 deletions

View File

@ -1004,6 +1004,9 @@ public class ApiAutomationService {
if (request.getConfig() != null && StringUtils.equals(request.getConfig().getReportType(), RunModeConstants.SET_REPORT.toString()) && StringUtils.isNotEmpty(request.getConfig().getReportName())) { if (request.getConfig() != null && StringUtils.equals(request.getConfig().getReportType(), RunModeConstants.SET_REPORT.toString()) && StringUtils.isNotEmpty(request.getConfig().getReportName())) {
request.getConfig().setReportId(UUID.randomUUID().toString()); request.getConfig().setReportId(UUID.randomUUID().toString());
if (CollectionUtils.isNotEmpty(scenarioIds) && scenarioIds.size() > 100) {
scenarioIds = scenarioIds.subList(0, 100);
}
APIScenarioReportResult report = createScenarioReport(request.getConfig().getReportId(), JSON.toJSONString(scenarioIds), scenarioNames.deleteCharAt(scenarioNames.toString().length() - 1).toString(), ReportTriggerMode.MANUAL.name(), APIScenarioReportResult report = createScenarioReport(request.getConfig().getReportId(), JSON.toJSONString(scenarioIds), scenarioNames.deleteCharAt(scenarioNames.toString().length() - 1).toString(), ReportTriggerMode.MANUAL.name(),
ExecuteType.Saved.name(), request.getProjectId(), request.getReportUserID(), request.getConfig()); ExecuteType.Saved.name(), request.getProjectId(), request.getReportUserID(), request.getConfig());
report.setName(request.getConfig().getReportName()); report.setName(request.getConfig().getReportName());