From 4dd9594329cf3eefd736116355c90290491fee6e Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Wed, 22 Sep 2021 14:14:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96)=20=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE=E5=A4=84?= =?UTF-8?q?=E7=90=86=20--bug=3D1006814=20--user=3D=E8=B5=B5=E5=8B=87=20?= =?UTF-8?q?=E3=80=90=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8=E5=8C=96=E3=80=91?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E6=B7=BB=E5=8A=A0=E7=9A=84=E6=97=A7=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=EF=BC=8C=E8=B0=83=E8=AF=95=E9=83=BD=E4=BC=9A=E6=8A=A5?= =?UTF-8?q?=E9=94=99=EF=BC=8C=E9=87=8D=E6=96=B0=E4=BF=9D=E5=AD=98=EF=BC=8C?= =?UTF-8?q?=E5=86=8D=E6=89=A7=E8=A1=8C=E6=89=8D=E4=BC=9A=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=20https://www.tapd.cn/55049933/s/1049192?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/dto/definition/request/ElementUtil.java | 2 +- .../components/api/automation/scenario/DebugRun.vue | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/ElementUtil.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/ElementUtil.java index 55802e755a..15bd6362e0 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/ElementUtil.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/ElementUtil.java @@ -264,7 +264,7 @@ public class ElementUtil { put("ThreadGroup", "io.metersphere.api.dto.definition.request.MsThreadGroup"); put("DNSCacheManager", "io.metersphere.api.dto.definition.request.dns.MsDNSCacheManager"); put("DebugSampler", "io.metersphere.api.dto.definition.request.sampler.MsDebugSampler"); - + put("AuthManager", "io.metersphere.api.dto.definition.request.auth.MsAuthManager"); } }; diff --git a/frontend/src/business/components/api/automation/scenario/DebugRun.vue b/frontend/src/business/components/api/automation/scenario/DebugRun.vue index f974534d6b..0bc97a02ce 100644 --- a/frontend/src/business/components/api/automation/scenario/DebugRun.vue +++ b/frontend/src/business/components/api/automation/scenario/DebugRun.vue @@ -33,6 +33,18 @@ export default { } }, methods: { + sort(stepArray) { + if (stepArray) { + for (let i in stepArray) { + if (!stepArray[i].clazzName) { + stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type); + } + if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) { + this.sort(stepArray[i].hashTree); + } + } + } + }, run() { let testPlan = createComponent('TestPlan'); testPlan.clazzName = TYPE_TO_C.get(testPlan.type); @@ -47,6 +59,7 @@ export default { this.runData.clazzName = TYPE_TO_C.get(this.runData.type); threadGroup.hashTree.push(this.runData); testPlan.hashTree.push(threadGroup); + this.sort(testPlan.hashTree); let reqObj = { id: this.reportId, reportId: this.reportId, scenarioName: this.runData.name, saved: this.saved, scenarioId: this.runData.id, testElement: testPlan, projectId: getCurrentProjectID(), environmentMap: strMapToObj(map)