测试计划-测试用例关联测试
This commit is contained in:
parent
bceade43a9
commit
5cd7841004
|
@ -74,8 +74,12 @@
|
|||
<el-col :span="12">
|
||||
<el-form-item :label="$t('test_track.case.method')" :label-width="formLabelWidth" prop="method">
|
||||
<el-select :disabled="readOnly" v-model="form.method" :placeholder="$t('test_track.case.input_method')">
|
||||
<el-option :label="$t('test_track.case.manual')" value="manual"></el-option>
|
||||
<el-option :label="$t('test_track.case.auto')" value="auto"></el-option>
|
||||
<el-option
|
||||
v-for="item in methodOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -111,11 +115,11 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-row v-if="form.method && form.method != 'auto'" style="margin-bottom: 10px">
|
||||
<el-col :offset="2">{{$t('test_track.case.steps')}}:</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row type="flex" justify="center">
|
||||
<el-row v-if="form.method && form.method != 'auto'" type="flex" justify="center">
|
||||
<el-col :span="20">
|
||||
<el-table
|
||||
:data="form.steps"
|
||||
|
@ -238,6 +242,7 @@
|
|||
},
|
||||
moduleOptions: [],
|
||||
maintainerOptions: [],
|
||||
methodOptions: [],
|
||||
testOptions: [],
|
||||
workspaceId: '',
|
||||
rules:{
|
||||
|
@ -283,7 +288,6 @@
|
|||
methods: {
|
||||
open(testCase) {
|
||||
this.resetForm();
|
||||
this.getSelectOptions();
|
||||
this.operationType = 'add';
|
||||
if(testCase){
|
||||
//修改
|
||||
|
@ -311,6 +315,8 @@
|
|||
this.form.method = 'manual';
|
||||
this.form.maintainer = user.id;
|
||||
}
|
||||
|
||||
this.getSelectOptions();
|
||||
this.dialogFormVisible = true;
|
||||
},
|
||||
handleAddStep(index, data) {
|
||||
|
@ -389,6 +395,7 @@
|
|||
},
|
||||
typeChange() {
|
||||
this.form.testId = '';
|
||||
this.getMethodOptions();
|
||||
this.getTestOptions()
|
||||
},
|
||||
getModuleOptions() {
|
||||
|
@ -412,10 +419,22 @@
|
|||
});
|
||||
}
|
||||
},
|
||||
getMethodOptions() {
|
||||
if (!this.form.type || this.form.type != 'functional') {
|
||||
this.methodOptions = [
|
||||
{value: 'auto', label: this.$t('test_track.case.auto')},
|
||||
{value: 'manual', label: this.$t('test_track.case.manual')}
|
||||
];
|
||||
} else {
|
||||
this.form.method = 'manual';
|
||||
this.methodOptions = [{value: 'manual', label: this.$t('test_track.case.manual')}]
|
||||
}
|
||||
},
|
||||
getSelectOptions() {
|
||||
this.getModuleOptions();
|
||||
this.getMaintainerOptions();
|
||||
this.getTestOptions();
|
||||
this.getMethodOptions();
|
||||
},
|
||||
buildNodePath(node, option, moduleOptions) {
|
||||
//递归构建节点路径
|
||||
|
@ -441,6 +460,7 @@
|
|||
this.form.priority = '';
|
||||
this.form.prerequisite = '';
|
||||
this.form.remark = '';
|
||||
this.form.testId = '';
|
||||
this.form.steps = [{
|
||||
num: 1 ,
|
||||
desc: '',
|
||||
|
|
|
@ -85,7 +85,22 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-row v-if="testCase.method == 'auto' && testCase.testId">
|
||||
<el-col class="test-detail" :span="20" :offset="1">
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane :label="$t('test_track.plan_view.test_detail')">
|
||||
<ms-api-test-config v-if="testCase.type == 'api'"/>
|
||||
<edit-performance-test-plan v-if="testCase.type == 'performance'"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('test_track.plan_view.test_result')">
|
||||
<ms-api-report-view v-if="testCase.type == 'api'"/>
|
||||
<performance-report-view v-if="testCase.type == 'performance'"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="testCase.method && testCase.method != 'auto'">
|
||||
<el-col :span="20" :offset="1">
|
||||
<div>
|
||||
<span class="cast_label">{{$t('test_track.case.steps')}}:</span>
|
||||
|
@ -184,10 +199,16 @@
|
|||
<script>
|
||||
import TestPlanTestCaseStatusButton from '../../common/TestPlanTestCaseStatusButton';
|
||||
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
|
||||
import MsApiTestConfig from "../../../../api/test/ApiTestConfig";
|
||||
import MsApiReportView from "../../../../api/report/ApiReportView";
|
||||
import EditPerformanceTestPlan from "../../../../performance/test/EditPerformanceTestPlan";
|
||||
import PerformanceReportView from "../../../../performance/report/PerformanceReportView";
|
||||
|
||||
export default {
|
||||
name: "TestPlanTestCaseEdit",
|
||||
components: {TestPlanTestCaseStatusButton},
|
||||
components: {
|
||||
PerformanceReportView,
|
||||
EditPerformanceTestPlan, MsApiReportView, MsApiTestConfig, TestPlanTestCaseStatusButton},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
|
@ -196,6 +217,7 @@
|
|||
index: 0,
|
||||
testCases: [],
|
||||
editor: ClassicEditor,
|
||||
test: {}
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
@ -290,10 +312,18 @@
|
|||
if (this.testCases[i].id === testCase.id) {
|
||||
this.index = i;
|
||||
this.getTestCase(i);
|
||||
this.getRelatedTest();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getRelatedTest() {
|
||||
if (this.testCase.method == 'auto' && this.testCase.testId) {
|
||||
this.$get('/' + this.testCase.type + '/get/' + this.testCase.testId, response => {
|
||||
this.test = response.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
issuesChange() {
|
||||
if (this.testCase.issues.hasIssues) {
|
||||
let desc = this.addPLabel('[' + this.$t('test_track.plan_view.operate_step') + ']');
|
||||
|
@ -343,7 +373,7 @@
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
.el-col:not(.test-detail){
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
|
|
|
@ -489,6 +489,7 @@ export default {
|
|||
result_statistics_chart: "Result statistics chart",
|
||||
create_template: "Create template",
|
||||
report_template: "Report template",
|
||||
test_detail: "Test detail",
|
||||
}
|
||||
},
|
||||
test_resource_pool: {
|
||||
|
|
|
@ -486,6 +486,7 @@ export default {
|
|||
result_statistics_chart: "测试结果统计图",
|
||||
create_template: "新建模版",
|
||||
report_template: "测试报告模版",
|
||||
test_detail: "测试详情",
|
||||
}
|
||||
},
|
||||
test_resource_pool: {
|
||||
|
|
|
@ -488,6 +488,7 @@ export default {
|
|||
result_statistics_chart: "測試結果統計圖",
|
||||
create_template: "新建模版",
|
||||
report_template: "測試報告模版",
|
||||
test_detail: "測試詳情",
|
||||
}
|
||||
},
|
||||
test_resource_pool: {
|
||||
|
|
Loading…
Reference in New Issue