fix(接口测试): 场景重复

This commit is contained in:
wenyann 2020-08-11 15:57:50 +08:00
parent a8671ca4f3
commit 59c9cdfef2
2 changed files with 7 additions and 4 deletions

View File

@ -56,8 +56,8 @@
},
data() {
return {
minutes: Math.floor(this.totalTime / 60),
seconds: this.totalTime % 60,
minutes: Math.floor((this.totalTime % (1000 * 60 * 60)) / (1000 * 60)),
seconds: Math.round((this.totalTime % (1000 * 60)) / 1000),
}
},
computed: {

View File

@ -87,7 +87,10 @@
schedule: {},
});
this.test = this.test || test;
this.test.scenarioDefinition = this.test.scenarioDefinition.concat(test.scenarioDefinition);
if (this.tests.length > 1) {
this.test.scenarioDefinition = this.test.scenarioDefinition.concat(test.scenarioDefinition);
}
if (this.tests.length === this.selectIds.size) {
this.tests = [];
this.saveRunTest();
@ -127,7 +130,7 @@
}));
let jmx = this.test.toJMX();
let blob = new Blob([jmx.xml], {type: "application/octet-stream"});
formData.append("files", new File([blob], jmx.name));
formData.append("file", new File([blob], jmx.name));
return {
method: 'POST',
url: url,