fix(接口测试): 修复请求参数缺少属性问题 #16078

This commit is contained in:
fit2-zhao 2022-07-22 10:31:44 +08:00 committed by f2c-ci-robot[bot]
parent dea0c8e9c3
commit 7cc10bed91
1 changed files with 17 additions and 9 deletions

View File

@ -136,6 +136,7 @@ import BatchAddParameter from "../basis/BatchAddParameter";
import MsJsr233Processor from "../../../automation/scenario/component/Jsr233Processor"; import MsJsr233Processor from "../../../automation/scenario/component/Jsr233Processor";
import MsConstantTimer from "../../../automation/scenario/component/ConstantTimer"; import MsConstantTimer from "../../../automation/scenario/component/ConstantTimer";
import MsJdbcProcessor from "@/business/components/api/automation/scenario/component/JDBCProcessor"; import MsJdbcProcessor from "@/business/components/api/automation/scenario/component/JDBCProcessor";
import {TYPE_TO_C} from "@/business/components/api/automation/scenario/Setting";
export default { export default {
name: "MsJmxStep", name: "MsJmxStep",
@ -457,19 +458,26 @@ export default {
sort() { sort() {
let index = 1; let index = 1;
for (let i in this.request.hashTree) { for (let i in this.request.hashTree) {
if (this.tabType === 'pre' && (this.request.hashTree[i].type === 'JSR223PreProcessor' || let step = this.request.hashTree[i];
this.request.hashTree[i].type === 'JDBCPreProcessor' || this.request.hashTree[i].type === 'ConstantTimer')) { if (this.tabType === 'pre' &&
this.request.hashTree[i].index = Number(index); (step.type === 'JSR223PreProcessor' ||
step.type === 'JDBCPreProcessor' || step.type === 'ConstantTimer')) {
step.index = Number(index);
index++; index++;
} else if (this.tabType === 'post' && (this.request.hashTree[i].type === 'JSR223PostProcessor' || } else if (this.tabType === 'post' &&
this.request.hashTree[i].type === 'JDBCPostProcessor' || (step.type === 'JSR223PostProcessor' ||
this.request.hashTree[i].type === 'Extract')) { step.type === 'JDBCPostProcessor' ||
this.request.hashTree[i].index = Number(index); step.type === 'Extract')) {
step.index = Number(index);
index++; index++;
} else if (this.tabType === 'assertionsRule' && this.request.hashTree[i].type === 'Assertions') { } else if (this.tabType === 'assertionsRule' && step.type === 'Assertions') {
this.request.hashTree[i].index = Number(index); step.index = Number(index);
index++; index++;
} }
//
if (!step.clazzName) {
step.clazzName = TYPE_TO_C.get(step.type);
}
} }
}, },
// body // body