From 0db75e1b12c574f72cac2e3777bcac608537611a Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 25 Mar 2021 10:15:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BF=9D=E8=AF=81=E6=AF=8F=E6=AC=A1=E4=BB=8E=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B5=8B=E8=AF=95=E9=83=BD=E8=83=BD=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/performance/test/EditPerformanceTest.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/performance/test/EditPerformanceTest.vue b/frontend/src/business/components/performance/test/EditPerformanceTest.vue index 30168db9c5..656a867d25 100644 --- a/frontend/src/business/components/performance/test/EditPerformanceTest.vue +++ b/frontend/src/business/components/performance/test/EditPerformanceTest.vue @@ -127,7 +127,9 @@ export default { if (apiTest && apiTest.name) { this.$set(this.test, "name", apiTest.name); let blob = new Blob([apiTest.jmx.xml], {type: "application/octet-stream"}); - let file = new File([blob], apiTest.jmx.name); + let suffixIndex = apiTest.jmx.name.lastIndexOf(".jmx"); + let jmxName = apiTest.jmx.name.substring(0, suffixIndex) + "_" + new Date().getTime() + ".jmx"; + let file = new File([blob], jmxName); // 保证每次从接口测试都能创建新的性能测试 this.$refs.basicConfig.beforeUploadJmx(file); this.$refs.basicConfig.handleUpload({file: file}); if (JSON.stringify(apiTest.jmx.attachFiles) != "{}") { From 4e270cd4096149755be350999e868e7aafe385f4 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 25 Mar 2021 10:19:09 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BF=9D=E8=AF=81=E6=AF=8F=E6=AC=A1=E4=BB=8E=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B5=8B=E8=AF=95=E9=83=BD=E8=83=BD=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../performance/test/components/ExistScenarios.vue | 5 +++-- .../components/performance/test/components/ResourceFiles.vue | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/performance/test/components/ExistScenarios.vue b/frontend/src/business/components/performance/test/components/ExistScenarios.vue index ff33ff2a5b..e159ef00f0 100644 --- a/frontend/src/business/components/performance/test/components/ExistScenarios.vue +++ b/frontend/src/business/components/performance/test/components/ExistScenarios.vue @@ -132,12 +132,13 @@ export default { this.projectLoadingResult = this.$post('api/automation/export/jmx', condition, response => { let data = response.data; data.forEach(d => { - let threadGroups = findThreadGroup(d.jmx, d.name + ".jmx") + let jmxName = d.name + "_" + new Date().getTime() + ".jmx"; + let threadGroups = findThreadGroup(d.jmx, jmxName) threadGroups.forEach(tg => { tg.options = {}; this.scenarios.push(tg); }); - let file = new File([d.jmx], d.name + ".jmx"); + let file = new File([d.jmx], jmxName); this.uploadList.push(file); this.tableData.push({ name: file.name, diff --git a/frontend/src/business/components/performance/test/components/ResourceFiles.vue b/frontend/src/business/components/performance/test/components/ResourceFiles.vue index fc188f28bf..5e26e276f2 100644 --- a/frontend/src/business/components/performance/test/components/ResourceFiles.vue +++ b/frontend/src/business/components/performance/test/components/ResourceFiles.vue @@ -34,6 +34,7 @@ Date: Thu, 25 Mar 2021 10:24:41 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E5=85=B3=E8=81=94=E7=94=A8=E4=BE=8B=E9=A1=B5=E9=9D=A2=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=9C=AA=E9=80=89=E4=B8=AD=E5=BD=93=E5=89=8D=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../review/view/components/TestReviewRelevance.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue b/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue index aa18c8ecd8..341687c994 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue @@ -313,10 +313,17 @@ export default { this.$post("/test/case/review/projects", {reviewId: this.reviewId}, res => { let data = res.data; if (data) { - this.currentProject = data[0]; this.projects = data; - this.projectId = data[0].id; - this.projectName = data[0].name; + const index = data.findIndex(d => d.id === this.$store.state.projectId); + if (index !== -1) { + this.projectId = data[index].id; + this.projectName = data[index].name; + this.currentProject = data[index]; + } else { + this.projectId = data[0].id; + this.projectName = data[0].name; + this.currentProject = data[0]; + } } }) } From de857e713a567e83da624d593c7df977769954a1 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Thu, 25 Mar 2021 10:32:02 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E4=B8=BB=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V78__v1.8_release.sql | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/src/main/resources/db/migration/V78__v1.8_release.sql b/backend/src/main/resources/db/migration/V78__v1.8_release.sql index f9c3663834..052e96d640 100644 --- a/backend/src/main/resources/db/migration/V78__v1.8_release.sql +++ b/backend/src/main/resources/db/migration/V78__v1.8_release.sql @@ -239,10 +239,7 @@ insert into system_header (type, props) values ('test_case_list', '[{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"},{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"}]'); insert into system_header (type, props) -values ('test_case_list', - '[{"id":"tags","label":"标签"},{"id":"nodePath","label":"所属模块"},{"id":"updateTime","label":"更新时间"},{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"priority","label":"用例等级"},{"id":"reviewStatus","label":"评审状态"}]'); -insert into system_header (type, props) values ('test_plan_scenario_case', '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]'); - +alter table system_header add primary key(type);