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)