fix(接口测试): 修复任务中心全部停止报错及场景报告跳转问题

--bug=1018297 --user=赵勇 【测试跟踪】测试计划-接口测试-批量执行后任务中心点击全部停止提示异常 https://www.tapd.cn/55049933/s/1266110
This commit is contained in:
fit2-zhao 2022-10-18 15:10:59 +08:00 committed by f2c-ci-robot[bot]
parent f0fc806904
commit e71ae9a0e7
6 changed files with 15 additions and 10 deletions

View File

@ -67,6 +67,6 @@ public class KeyValue {
} }
public boolean isFile() { public boolean isFile() {
return (CollectionUtils.isNotEmpty(files)) && StringUtils.equalsIgnoreCase(type, "file"); return (CollectionUtils.isNotEmpty(files)) && (StringUtils.isEmpty(type) || StringUtils.equalsIgnoreCase(type, "file"));
} }
} }

View File

@ -188,8 +188,7 @@ public class JMeterService {
public void run(JmeterRunRequestDTO request) { public void run(JmeterRunRequestDTO request) {
//UI 测试只走本地 ms资源池交给 selenium-grid 本身实现 if (request.getPool().isPool() && StringUtils.isNotBlank(request.getRunMode())) {
if (request.getPool().isPool() && StringUtils.isNotBlank(request.getRunMode()) && !request.getRunMode().startsWith("UI")) {
this.runNode(request); this.runNode(request);
} else { } else {
//解析hashTree是否含有文件库文件 //解析hashTree是否含有文件库文件

View File

@ -445,7 +445,7 @@
</if> </if>
<if test="request.redirectFilter == 'unexecuteCount' "> <if test="request.redirectFilter == 'unexecuteCount' ">
and (t3.status IS NULL or t3.status = '' or t3.status = 'Prepare' or t3.status = 'Underway' or t3.status = and (t3.status IS NULL or t3.status = '' or t3.status = 'Prepare' or t3.status = 'Underway' or t3.status =
'stop') 'STOPPED')
</if> </if>
<if test="request.redirectFilter == 'executionPassCount' "> <if test="request.redirectFilter == 'executionPassCount' ">
and t3.status = 'success' and t3.status = 'success'

View File

@ -121,7 +121,7 @@ export default {
}, },
watch: { watch: {
message() { message() {
if (this.message === 'stop') { if (this.message === 'STOPPED') {
this.scenario.run = false; this.scenario.run = false;
} }
this.reload(); this.reload();

View File

@ -17,24 +17,26 @@
<ms-table-column <ms-table-column
prop="name" prop="name"
show-overflow-tooltip show-overflow-tooltip
:width="100" :min-width="150"
:label="$t('load_test.file_name')"> :label="$t('load_test.file_name')">
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
sortable sortable
prop="type" prop="type"
:min-width="150"
:filters="typeFilters" :filters="typeFilters"
:label="$t('load_test.file_type')"> :label="$t('load_test.file_type')">
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
prop="description" prop="description"
:min-width="100"
:label="$t('group.description')"> :label="$t('group.description')">
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
prop="tags" prop="tags"
min-width="60px" width="100px"
:show-overflow-tooltip=false :show-overflow-tooltip=false
:label="$t('commons.tag')"> :label="$t('commons.tag')">
<template v-slot:default="scope"> <template v-slot:default="scope">
@ -56,17 +58,21 @@
<ms-table-column <ms-table-column
sortable sortable
prop="createUser" prop="createUser"
:min-width="100"
:label="$t('commons.create_user')"> :label="$t('commons.create_user')">
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
sortable sortable
prop="updateUser" prop="updateUser"
:min-width="100"
:label="$t('ui.update_user')"> :label="$t('ui.update_user')">
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
sortable sortable
:label="$t('commons.update_time')" :label="$t('commons.update_time')"
:min-width="150"
fixed="right"
prop="updateTime"> prop="updateTime">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ scope.row.updateTime | datetimeFormat }}</span> <span>{{ scope.row.updateTime | datetimeFormat }}</span>
@ -89,7 +95,7 @@ import {getFileMetadataList, getMetadataTypes} from "metersphere-frontend/src/ap
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination"; import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
import MsTableButton from "metersphere-frontend/src/components/MsTableButton"; import MsTableButton from "metersphere-frontend/src/components/MsTableButton";
import MsDialogFooter from "metersphere-frontend/src/components/MsDialogFooter"; import MsDialogFooter from "metersphere-frontend/src/components/MsDialogFooter";
import {getCurrentProjectID, getCurrentUserId} from "metersphere-frontend/src/utils/token"; import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOperatorButton"; import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOperatorButton";
import MsTableHeader from "./FileHeader"; import MsTableHeader from "./FileHeader";
import MsTableSearchBar from "metersphere-frontend/src/components/MsTableSearchBar"; import MsTableSearchBar from "metersphere-frontend/src/components/MsTableSearchBar";

View File

@ -218,7 +218,7 @@
</select> </select>
<update id="stopScenario"> <update id="stopScenario">
UPDATE api_scenario_report SET status ='STOP' WHERE status IN ("running","starting","waiting") AND UPDATE api_scenario_report SET status ='STOPPED' WHERE status IN ("running","starting","waiting") AND
project_id IN project_id IN
<foreach collection="request.projects" item="id" separator="," open="(" close=")"> <foreach collection="request.projects" item="id" separator="," open="(" close=")">
#{id} #{id}
@ -227,7 +227,7 @@
<update id="stopApi"> <update id="stopApi">
UPDATE api_definition_exec_result SET status ='STOP' WHERE status IN ("running","starting","waiting") AND UPDATE api_definition_exec_result SET status ='STOPPED' WHERE status IN ("running","starting","waiting") AND
project_id IN project_id IN
<foreach collection="request.projects" item="id" separator="," open="(" close=")"> <foreach collection="request.projects" item="id" separator="," open="(" close=")">
#{id} #{id}