refactor(接口测试): 测试

This commit is contained in:
q4speed 2020-11-11 17:10:13 +08:00
parent b9126f282b
commit 02e8b7b12b
2 changed files with 13 additions and 10 deletions

View File

@ -298,7 +298,11 @@ export default {
});
},
cancel() {
this.$router.push('/api/test/list/all');
this.result = this.$post("/api/jmx", this.test, response => {
console.log(response.data);
console.log(this.test.toJMX().xml)
});
// this.$router.push('/api/test/list/all');
},
createPerformance() {
let validator = this.test.isValid();
@ -322,7 +326,6 @@ export default {
});
},
handleCommand(command) {
switch (command) {
case "report":
this.$refs.reportDialog.open();

View File

@ -201,12 +201,12 @@ export class Test extends BaseConfig {
return {isValid: true};
}
// toJMX() {
// return {
// name: this.name + '.jmx',
// xml: new JMXGenerator(this).toXML()
// };
// }
toJMX() {
return {
name: this.name + '.jmx',
xml: new JMXGenerator(this).toXML()
};
}
}
export class Scenario extends BaseConfig {
@ -973,7 +973,7 @@ export class ConstantTimer extends Timer {
}
}
/** ------------------------------------------------------------------------
/** ------------------------------------------------------------------------ **/
const JMX_ASSERTION_CONDITION = {
MATCH: 1,
CONTAINS: 1 << 1,
@ -1540,4 +1540,4 @@ class JMXGenerator {
}
}
**/