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() { 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() { createPerformance() {
let validator = this.test.isValid(); let validator = this.test.isValid();
@ -322,7 +326,6 @@ export default {
}); });
}, },
handleCommand(command) { handleCommand(command) {
switch (command) { switch (command) {
case "report": case "report":
this.$refs.reportDialog.open(); this.$refs.reportDialog.open();

View File

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