From d2cf26b16cd66b958d39a7b1db54a24c1390dcdf Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 26 Nov 2020 11:52:43 +0800 Subject: [PATCH 1/8] =?UTF-8?q?chore:=20=E5=90=8C=E6=AD=A5=20submodule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 9e62022ae909037edb2161eceb190dccb3b494e4) --- backend/src/main/java/io/metersphere/xpack | 2 +- frontend/src/business/components/xpack | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 57d6f78efa..bb494fc68a 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 57d6f78efa4b0300be188e8b024511ceef0873ed +Subproject commit bb494fc68a2367359c9048fa7250c7618de4afb6 diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 71d57ae5d7..8a972a1987 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 71d57ae5d7f8bb5c93a29504ac6f2300dc189ce9 +Subproject commit 8a972a198775b3783ed6e4cef27197e53d1ebdc8 From 320ca1c5428247bd6dfaace3d906f1c918f04f00 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 27 Nov 2020 11:16:03 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E5=8D=95=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=AF=B7=E6=B1=82=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/report/components/RequestResultTail.vue | 6 ++++++ .../api/test/components/request/ApiRequestForm.vue | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/api/report/components/RequestResultTail.vue b/frontend/src/business/components/api/report/components/RequestResultTail.vue index d9f51e0c06..049a419b3f 100644 --- a/frontend/src/business/components/api/report/components/RequestResultTail.vue +++ b/frontend/src/business/components/api/report/components/RequestResultTail.vue @@ -117,6 +117,12 @@ } }, + watch: { + 'request.responseResult'() { + this.reload(); + } + }, + computed: { assertion() { return this.request.passAssertions + " / " + this.request.totalAssertions; diff --git a/frontend/src/business/components/api/test/components/request/ApiRequestForm.vue b/frontend/src/business/components/api/test/components/request/ApiRequestForm.vue index 3efe8a7e8b..d5f9beef63 100644 --- a/frontend/src/business/components/api/test/components/request/ApiRequestForm.vue +++ b/frontend/src/business/components/api/test/components/request/ApiRequestForm.vue @@ -101,7 +101,6 @@ export default { this.request.debugScenario = new Scenario(); this.request.debugRequestResult = {responseResult: {}, subRequestResults: []}; } - this.$refs.msDebugResult.reload(); } else { setTimeout(this.getReport, 2000) } From 8333c3f77d2ac7ce9c591964f0055157b07cfe41 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 27 Nov 2020 13:39:22 +0800 Subject: [PATCH 3/8] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E9=A6=96=E9=A1=B5=E6=9C=80=E8=BF=91=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtTestPlanTestCaseMapper.java | 1 + .../base/mapper/ext/ExtTestPlanTestCaseMapper.xml | 10 ++++++++++ .../track/service/TestPlanTestCaseService.java | 6 ++---- .../track/home/components/TestCaseSideList.vue | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java index 1bff19ab89..147bf91dbc 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java @@ -38,4 +38,5 @@ public interface ExtTestPlanTestCaseMapper { */ List listTestCaseByProjectIds(@Param("ids") List ids); + TestPlanCaseDTO get(String testPlanTestCaseId); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index 7b267835c1..c3025bea29 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -307,6 +307,16 @@ + + + update test_plan_test_case diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java index 04abe860b0..e5d306bf4f 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java @@ -129,10 +129,8 @@ public class TestPlanTestCaseService { request.setExecutor(user.getId()); } - public TestPlanCaseDTO get(String caseId) { - QueryTestPlanCaseRequest request = new QueryTestPlanCaseRequest(); - request.setId(caseId); - return extTestPlanTestCaseMapper.list(request).get(0); + public TestPlanCaseDTO get(String testplanTestCaseId) { + return extTestPlanTestCaseMapper.get(testplanTestCaseId); } public void deleteTestCaseBath(TestPlanCaseBatchRequest request) { diff --git a/frontend/src/business/components/track/home/components/TestCaseSideList.vue b/frontend/src/business/components/track/home/components/TestCaseSideList.vue index fa51914573..26f3a97663 100644 --- a/frontend/src/business/components/track/home/components/TestCaseSideList.vue +++ b/frontend/src/business/components/track/home/components/TestCaseSideList.vue @@ -85,7 +85,7 @@ }); }, editTestCase(row, event, column) { - this.$router.push('/track/plan/view/edit/' + row.caseId) + this.$router.push('/track/plan/view/edit/' + row.id) } } } From c0329ce42a69c2c3cc6e99061c731ccb0dd68172 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 27 Nov 2020 16:02:35 +0800 Subject: [PATCH 4/8] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B?= =?UTF-8?q?=E8=AF=95):=20=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B8=85=E7=A9=BA=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/components/request/database/DatabaseConfig.vue | 6 +++++- .../components/request/database/DatabaseConfigList.vue | 4 ++++ .../api/test/components/request/database/DatabaseFrom.vue | 8 ++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/api/test/components/request/database/DatabaseConfig.vue b/frontend/src/business/components/api/test/components/request/database/DatabaseConfig.vue index 7542ed13df..d362fe1bde 100644 --- a/frontend/src/business/components/api/test/components/request/database/DatabaseConfig.vue +++ b/frontend/src/business/components/api/test/components/request/database/DatabaseConfig.vue @@ -58,7 +58,11 @@ this.currentConfig = new DatabaseConfig(); }, rowSelect(config) { - this.currentConfig = config; + //防止清除后再点击该行无响应 + this.currentConfig = {}; + this.$nextTick(() => { + this.currentConfig = config; + }); } } } diff --git a/frontend/src/business/components/api/test/components/request/database/DatabaseConfigList.vue b/frontend/src/business/components/api/test/components/request/database/DatabaseConfigList.vue index 965a20e2c5..5e09c8431b 100644 --- a/frontend/src/business/components/api/test/components/request/database/DatabaseConfigList.vue +++ b/frontend/src/business/components/api/test/components/request/database/DatabaseConfigList.vue @@ -80,4 +80,8 @@ float: right; } + .el-table { + cursor: pointer; + } + diff --git a/frontend/src/business/components/api/test/components/request/database/DatabaseFrom.vue b/frontend/src/business/components/api/test/components/request/database/DatabaseFrom.vue index deb09fbaa9..9f6731fc03 100644 --- a/frontend/src/business/components/api/test/components/request/database/DatabaseFrom.vue +++ b/frontend/src/business/components/api/test/components/request/database/DatabaseFrom.vue @@ -39,9 +39,10 @@
- {{$t('commons.validate')}} + {{$t('commons.validate')}} {{$t('commons.update')}} - {{$t('commons.add')}} + {{$t('commons.clear')}} + {{$t('commons.add')}}
@@ -127,6 +128,9 @@ } }); }, + clear() { + this.currentConfig = new DatabaseConfig(); + }, validate() { this.result = this.$post('/api/database/validate', this.currentConfig, () => { this.$success(this.$t('commons.connection_successful')); From b9052ca787cb142ea456b6aa9580f9d562b81435 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 27 Nov 2020 16:28:49 +0800 Subject: [PATCH 5/8] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E5=88=A0=E9=99=A4=E6=B5=8B=E8=AF=95=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E6=97=B6=E5=88=A0=E9=99=A4=E7=9B=B8=E5=85=B3=E7=9A=84jtl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/performance/service/ReportService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/java/io/metersphere/performance/service/ReportService.java b/backend/src/main/java/io/metersphere/performance/service/ReportService.java index 3bc2fabaf6..1e6cc8b353 100644 --- a/backend/src/main/java/io/metersphere/performance/service/ReportService.java +++ b/backend/src/main/java/io/metersphere/performance/service/ReportService.java @@ -105,6 +105,9 @@ public class ReportService { example.createCriteria().andReportIdEqualTo(reportId); loadTestReportDetailMapper.deleteByExample(example); + // delete jtl file + fileService.deleteFileById(loadTestReport.getFileId()); + loadTestReportMapper.deleteByPrimaryKey(reportId); } From c53fe5ac4a2ecbc113f7b32a517cd2e0d2c2a07a Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 27 Nov 2020 17:57:23 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E5=BC=95=E7=94=A8=E7=9A=84=E5=9C=BA=E6=99=AF=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=A6=81=E7=94=A8=E5=90=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/dto/scenario/Scenario.java | 1 + .../components/api/test/ApiTestConfig.vue | 6 +++++- .../api/test/components/ApiScenarioConfig.vue | 20 ++++++++++++++----- .../components/request/ApiRequestConfig.vue | 7 +++++-- .../api/test/model/ScenarioModel.js | 11 +++++++++- 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java b/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java index e245cbdc09..20bc993991 100644 --- a/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java +++ b/backend/src/main/java/io/metersphere/api/dto/scenario/Scenario.java @@ -21,4 +21,5 @@ public class Scenario { private TCPConfig tcpConfig; private List databaseConfigs; private Boolean enable; + private Boolean referenceEnable; } diff --git a/frontend/src/business/components/api/test/ApiTestConfig.vue b/frontend/src/business/components/api/test/ApiTestConfig.vue index b20dd09439..504b3f3d38 100644 --- a/frontend/src/business/components/api/test/ApiTestConfig.vue +++ b/frontend/src/business/components/api/test/ApiTestConfig.vue @@ -171,7 +171,11 @@ export default { let scenarios = []; this.test.scenarioDefinition.forEach(scenario => { if (scenario.isReference()) { - if (scenarioMap[scenario.id]) scenarios.push(scenarioMap[scenario.id]); + if (scenarioMap[scenario.id]) { + let item = scenarioMap[scenario.id]; + item.referenceEnable = scenario.referenceEnable; + scenarios.push(item); + } } else { scenarios.push(scenario); } diff --git a/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue b/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue index 98f388dfc0..cff3eefaa8 100644 --- a/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue +++ b/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue @@ -5,7 +5,7 @@ + :title="scenario.name" :name="index" :class="{'disable-scenario': !scenario.isEnable()}">