From 0ae9928f213c79f0d7aa02978fb486c8f29e8900 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 24 May 2023 18:53:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=9C=BA=E6=99=AF=E5=AF=BC=E5=85=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1026453 --user=宋昌昌 【接口测试】接口场景覆盖导入,场景没有变更,但是新建了版本,选不覆盖也新建版本了 https://www.tapd.cn/55049933/s/1375329 --- .../service/scenario/ApiScenarioModuleService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioModuleService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioModuleService.java index 5984eec2da..8c76d02203 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioModuleService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioModuleService.java @@ -528,6 +528,12 @@ public class ApiScenarioModuleService extends NodeTreeService new TreeSet<>(Comparator.comparing(t -> t.getName() + t.getModulePath()))), ArrayList::new) ); + if (!fullCoverage) { + //不覆盖, 系统场景存在则不导入 + Map systemScenarios = repeatAllScenarioWithBLOBs.stream().collect(Collectors.toMap(ApiScenario::getName, scenario -> scenario)); + optionData.removeIf(handleData -> systemScenarios.containsKey(handleData.getName())); + } + Map nameModuleMap = null; Map repeatDataMap = null; if (chooseModule != null) { @@ -555,7 +561,7 @@ public class ApiScenarioModuleService extends NodeTreeService