From 6a89622f5e039a8d29ae044e45c2a26ac2f47884 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 27 Dec 2021 10:10:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=A7=E8=A1=8C=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E6=98=BE=E7=A4=BA=E6=B5=8B=E8=AF=95=E4=B8=AD=EF=BC=8C?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=81=9C=E6=AD=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009232 --user=赵勇 【接口测试】执行测试用例还是一直执行中【+github#8807】 https://www.tapd.cn/55049933/s/1087011 --- .../component/ApiResponseComponent.vue | 2 +- .../api/definition/components/Run.vue | 3 +- .../components/response/ResponseResult.vue | 247 +++++++++--------- 3 files changed, 125 insertions(+), 127 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/component/ApiResponseComponent.vue b/frontend/src/business/components/api/automation/scenario/component/ApiResponseComponent.vue index 9369b646b5..009b2f6287 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ApiResponseComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ApiResponseComponent.vue @@ -60,7 +60,7 @@ export default { if (this.apiItem && this.apiItem.id) { let url = "/api/definition/report/getReport/" + this.apiItem.id; this.$get(url, response => { - if (response.data) { + if (response.data && response.data.content) { try { let data = JSON.parse(response.data.content); this.response = data; diff --git a/frontend/src/business/components/api/definition/components/Run.vue b/frontend/src/business/components/api/definition/components/Run.vue index c9716c6443..2dfafd873b 100644 --- a/frontend/src/business/components/api/definition/components/Run.vue +++ b/frontend/src/business/components/api/definition/components/Run.vue @@ -23,7 +23,7 @@ export default { return { result: {}, loading: false, - requestResult: {}, + requestResult: {responseResult: {}}, reqNumber: 0, websocket: {} } @@ -123,6 +123,7 @@ export default { threadGroup.hashTree.push(item); }) this.sort(testPlan.hashTree); + this.requestResult.reportId = this.reportId; let reqObj = {id: this.reportId, testElement: testPlan, type: this.type, clazzName: this.clazzName ? this.clazzName : TYPE_TO_C.get(this.type), projectId: projectId, environmentMap: strMapToObj(this.envMap)}; let bodyFiles = getBodyUploadFiles(reqObj, this.runData); if (this.runData[0].url) { diff --git a/frontend/src/business/components/api/definition/components/response/ResponseResult.vue b/frontend/src/business/components/api/definition/components/response/ResponseResult.vue index ac1cff56d1..0eb2e48338 100644 --- a/frontend/src/business/components/api/definition/components/response/ResponseResult.vue +++ b/frontend/src/business/components/api/definition/components/response/ResponseResult.vue @@ -1,6 +1,5 @@