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