解决测试计划性能测试相关bug
This commit is contained in:
@@ -74,6 +74,6 @@ export function editAndExecuteTest(data) {
|
||||
export function executeTest(query) {
|
||||
return request({
|
||||
url: '/test/performanceTest/executeNow?id=' + query,
|
||||
method: 'get',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="name-wrap">测试名称</div>
|
||||
<el-input v-model="addForm.performanceName" placeholder="请输入名称" maxlength="255" show-word-limit></el-input>
|
||||
</div>
|
||||
<div class="save">
|
||||
<div class="save" v-loading="loading">
|
||||
<el-button type="primary" plain @click="handleWithSave">保存</el-button>
|
||||
<el-button type="primary" plain @click="handleWithSaveAndExecute">保存并执行</el-button>
|
||||
<el-button type="primary" plain @click="handleWithExecute">立即执行</el-button>
|
||||
@@ -166,6 +166,7 @@ export default {
|
||||
crontabStatus: '0', // 定时任务状态:0关闭,1开启,默认0
|
||||
loopCount: '0', // 迭代次数,默认0
|
||||
},
|
||||
loading: false,
|
||||
activeName: 'first',
|
||||
sceneList: [], // 场景列表
|
||||
dialogVisible: false, // 场景列表
|
||||
@@ -247,6 +248,7 @@ export default {
|
||||
this.$message({ message: '请输入Crontab表达式', type: 'warning' })
|
||||
return
|
||||
}
|
||||
this.loading = true;
|
||||
editAndExecuteTest(this.addForm).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message({ message: '编辑成功', type: 'success' })
|
||||
@@ -254,17 +256,22 @@ export default {
|
||||
} else {
|
||||
this.$message({ message: '编辑失败', type: 'error' })
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
// 立即执行
|
||||
handleWithExecute() {
|
||||
this.loading = true;
|
||||
executeTest(this.$route.query.id).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message({ message: '执行成功', type: 'success' })
|
||||
this.$tab.closeOpenPage({ path: "/performance/performance" });
|
||||
// this.$tab.closeOpenPage({ path: "/performance/performance" });
|
||||
} else {
|
||||
this.$message({ message: '执行失败', type: 'error' })
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
// 取消
|
||||
|
||||
@@ -145,9 +145,9 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
relateCaseVue() {
|
||||
this.open = true;
|
||||
this.reset();
|
||||
this.$refs.relateCase.getList()
|
||||
// this.open = true;
|
||||
// this.reset();
|
||||
// this.$refs.relateCase.getList()
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
@@ -176,7 +176,9 @@ export default {
|
||||
return runTestPlanCase(queryParams);
|
||||
}).then((res) => {
|
||||
this.$modal.msgSuccess("提交执行成功");
|
||||
this.open = true;
|
||||
// this.open = true;
|
||||
this.loading = false;
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user