测试用例执行相关优化

This commit is contained in:
liangdaliang
2025-03-21 16:09:53 +08:00
parent 2addbd2179
commit b4c89d3b9a
7 changed files with 72 additions and 12 deletions

View File

@@ -178,6 +178,32 @@ export default {
let compareName = '${' + name + '}';
return this.extract_object.some(obj => obj.value === compareName);
},
handleTableEdit(e, flag, scope) {
if (flag === "assignment") {
if (e && this.form.assignment.length === scope.$index + 1) {
this.form.assignment.push({
key: "",
value: ""
})
}
}
if (flag === "assertion") {
if (e && this.form.assertion.length === scope.$index + 1) {
this.form.assertion.push({
key: "",
value: ""
})
}
}
},
handleDelete(flag, scope) {
if (flag === "assignment") {
this.form.assignment.splice(scope.$index, 1)
}
if (flag === "assertion") {
this.form.assertion.splice(scope.$index, 1)
}
},
handleLogChange(val) {
const selectedItem = this.form.testCaseResultList.find(item => item.title === val);
if (selectedItem) {

View File

@@ -33,7 +33,7 @@
<script>
import FolderPage from "@/components/FolderPage/index.vue";
import Report from "@/views/test/case/report/index.vue";
import {addCase, delCase, listCase, runCase} from "@/api/test/case";
import {addCase, delCase, listCase, runCaseSync} from "@/api/test/case";
export default {
name: "Case",
@@ -89,12 +89,14 @@ export default {
});
},
handleRun(id) {
this.loading = true;
this.$modal.confirm('是否确认执行用例?').then(function () {
return runCase(id);
return runCaseSync(id);
}).then((res) => {
this.$modal.msgSuccess("执行成功");
this.caseSID = res.msg
this.caseSID = res.data
this.open = true;
this.loading = false;
});
},
handleRowClick(row) {