From e71ae9a0e7a9b225c8ffdeb72604108b3ed55301 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 18 Oct 2022 15:10:59 +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=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E5=81=9C=E6=AD=A2=E6=8A=A5=E9=94=99=E5=8F=8A=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E6=8A=A5=E5=91=8A=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018297 --user=赵勇 【测试跟踪】测试计划-接口测试-批量执行后任务中心点击全部停止提示异常 https://www.tapd.cn/55049933/s/1266110 --- .../io/metersphere/api/dto/scenario/KeyValue.java | 2 +- .../io/metersphere/api/jmeter/JMeterService.java | 3 +-- .../base/mapper/ext/ExtApiTestCaseMapper.xml | 2 +- .../scenario/component/ApiScenarioComponent.vue | 2 +- .../frontend/src/business/commons/QuoteFileList.vue | 12 +++++++++--- .../metersphere/base/mapper/ext/BaseTaskMapper.xml | 4 ++-- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/api/dto/scenario/KeyValue.java b/api-test/backend/src/main/java/io/metersphere/api/dto/scenario/KeyValue.java index 322ec69dfa..28fe3fc5d5 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/dto/scenario/KeyValue.java +++ b/api-test/backend/src/main/java/io/metersphere/api/dto/scenario/KeyValue.java @@ -67,6 +67,6 @@ public class KeyValue { } public boolean isFile() { - return (CollectionUtils.isNotEmpty(files)) && StringUtils.equalsIgnoreCase(type, "file"); + return (CollectionUtils.isNotEmpty(files)) && (StringUtils.isEmpty(type) || StringUtils.equalsIgnoreCase(type, "file")); } } diff --git a/api-test/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java b/api-test/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java index 00faba5752..dce69daefa 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java +++ b/api-test/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java @@ -188,8 +188,7 @@ public class JMeterService { public void run(JmeterRunRequestDTO request) { - //UI 测试只走本地 ms,资源池交给 selenium-grid 本身实现 - if (request.getPool().isPool() && StringUtils.isNotBlank(request.getRunMode()) && !request.getRunMode().startsWith("UI")) { + if (request.getPool().isPool() && StringUtils.isNotBlank(request.getRunMode())) { this.runNode(request); } else { //解析hashTree,是否含有文件库文件 diff --git a/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml index a283c1f71a..51af62ddfb 100644 --- a/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml +++ b/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml @@ -445,7 +445,7 @@ and (t3.status IS NULL or t3.status = '' or t3.status = 'Prepare' or t3.status = 'Underway' or t3.status = - 'stop') + 'STOPPED') and t3.status = 'success' diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue index 634a176bf6..ba21a67063 100644 --- a/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue @@ -121,7 +121,7 @@ export default { }, watch: { message() { - if (this.message === 'stop') { + if (this.message === 'STOPPED') { this.scenario.run = false; } this.reload(); diff --git a/api-test/frontend/src/business/commons/QuoteFileList.vue b/api-test/frontend/src/business/commons/QuoteFileList.vue index 713f8178e1..3ede7c975c 100644 --- a/api-test/frontend/src/business/commons/QuoteFileList.vue +++ b/api-test/frontend/src/business/commons/QuoteFileList.vue @@ -17,24 +17,26 @@