|
|
@@ -164,6 +164,70 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="自动化测试结果" name="autoTest_result">
|
|
|
+ <h5>注:Max、Min、Average的单位均为ms</h5>
|
|
|
+ <ElTable :data="autoTestResult" width="100%">
|
|
|
+ <ElTableColumn
|
|
|
+ prop="id"
|
|
|
+ label="ID"
|
|
|
+ align="center"
|
|
|
+ width="60">
|
|
|
+ </ElTableColumn>
|
|
|
+<!-- <ElTableColumn-->
|
|
|
+<!-- prop="testId"-->
|
|
|
+<!-- label="所属测试ID"-->
|
|
|
+<!-- align="center"-->
|
|
|
+<!-- width="100">-->
|
|
|
+<!-- </ElTableColumn>-->
|
|
|
+ <ElTableColumn
|
|
|
+ prop="executeTime"
|
|
|
+ label="执行时间"
|
|
|
+ align="center"
|
|
|
+ width="100">
|
|
|
+ </ElTableColumn>
|
|
|
+<!-- <ElTableColumn-->
|
|
|
+<!-- prop="timeList"-->
|
|
|
+<!-- label="执行时间列表"-->
|
|
|
+<!-- align="center">-->
|
|
|
+<!-- </ElTableColumn>-->
|
|
|
+ <ElTableColumn
|
|
|
+ prop="success"
|
|
|
+ label="成功"
|
|
|
+ align="center"
|
|
|
+ width="100">
|
|
|
+ </ElTableColumn>
|
|
|
+ <ElTableColumn
|
|
|
+ prop="failure"
|
|
|
+ label="失败"
|
|
|
+ align="center"
|
|
|
+ width="100">
|
|
|
+ </ElTableColumn>
|
|
|
+ <ElTableColumn
|
|
|
+ prop="maxTime"
|
|
|
+ label="Max"
|
|
|
+ align="center"
|
|
|
+ width="100">
|
|
|
+ </ElTableColumn>
|
|
|
+ <ElTableColumn
|
|
|
+ prop="minTime"
|
|
|
+ label="Min"
|
|
|
+ align="center"
|
|
|
+ width="100">
|
|
|
+ </ElTableColumn>
|
|
|
+ <ElTableColumn
|
|
|
+ prop="averageTime"
|
|
|
+ label="Average"
|
|
|
+ align="center"
|
|
|
+ width="100">
|
|
|
+ </ElTableColumn>
|
|
|
+ <ElTableColumn
|
|
|
+ prop="pipelineHistoryId"
|
|
|
+ label="流水线ID"
|
|
|
+ align="center"
|
|
|
+ width="100">
|
|
|
+ </ElTableColumn>
|
|
|
+ </ElTable>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -317,9 +381,15 @@
|
|
|
</ElTableColumn>
|
|
|
<ElTableColumn
|
|
|
prop="title"
|
|
|
- label="title"
|
|
|
+ label="标题"
|
|
|
align="center">
|
|
|
</ElTableColumn>
|
|
|
+ <ElTableColumn
|
|
|
+ prop="taskId"
|
|
|
+ label="关联的任务ID"
|
|
|
+ align="center"
|
|
|
+ width="150">
|
|
|
+ </ElTableColumn>
|
|
|
<ElTableColumn
|
|
|
prop="pass"
|
|
|
label="执行状态"
|
|
|
@@ -344,7 +414,8 @@
|
|
|
</ElTableColumn>
|
|
|
<ElTableColumn
|
|
|
label="详情"
|
|
|
- align="center">
|
|
|
+ align="center"
|
|
|
+ width="120">
|
|
|
<template #default="scope">
|
|
|
<ElButton
|
|
|
@click="handleTestCasesClick('steps', scope.row.id)"
|
|
|
@@ -435,7 +506,7 @@
|
|
|
:model="createTestCaseForm"
|
|
|
ref="createTestCaseForm"
|
|
|
label-position="right"
|
|
|
- label-width="60px"
|
|
|
+ label-width="70px"
|
|
|
label-suffix=":"
|
|
|
class="create-APITest-form">
|
|
|
<el-form-item label="title" prop="title">
|
|
|
@@ -445,6 +516,14 @@
|
|
|
:rows="5"
|
|
|
placeholder="请输入测试用例的标题"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="taskId" prop="taskId">
|
|
|
+ <el-select v-model="createTestCaseForm.taskId">
|
|
|
+ <el-option
|
|
|
+ v-for="item in taskIdList"
|
|
|
+ :key="item"
|
|
|
+ :value="item"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
@@ -478,7 +557,7 @@
|
|
|
<el-col :span="20">
|
|
|
<el-row class="entry-row" style="margin-top: 15px; margin-bottom: 30px">
|
|
|
<el-col :span="2">
|
|
|
- <h4>title: </h4>
|
|
|
+ <h4>标题: </h4>
|
|
|
</el-col>
|
|
|
<el-col :span="18">
|
|
|
<div>{{detailTestCaseInfo.title}}</div>
|
|
|
@@ -638,69 +717,6 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</ElTabPane>
|
|
|
- <ElTabPane label="自动化测试结果" name="autotest">
|
|
|
- <ElTable :data="autoTestResult" width="100%">
|
|
|
- <ElTableColumn
|
|
|
- prop="id"
|
|
|
- label="ID"
|
|
|
- align="center"
|
|
|
- width="60">
|
|
|
- </ElTableColumn>
|
|
|
- <ElTableColumn
|
|
|
- prop="testId"
|
|
|
- label="所属测试ID"
|
|
|
- align="center"
|
|
|
- width="100">
|
|
|
- </ElTableColumn>
|
|
|
- <ElTableColumn
|
|
|
- prop="executeTime"
|
|
|
- label="执行时间"
|
|
|
- align="center"
|
|
|
- width="100">
|
|
|
- </ElTableColumn>
|
|
|
- <ElTableColumn
|
|
|
- prop="timeList"
|
|
|
- label="执行时间列表"
|
|
|
- align="center">
|
|
|
- </ElTableColumn>
|
|
|
- <ElTableColumn
|
|
|
- prop="success"
|
|
|
- label="success"
|
|
|
- align="center"
|
|
|
- width="100">
|
|
|
- </ElTableColumn>
|
|
|
- <ElTableColumn
|
|
|
- prop="failure"
|
|
|
- label="failure"
|
|
|
- align="center"
|
|
|
- width="100">
|
|
|
- </ElTableColumn>
|
|
|
- <ElTableColumn
|
|
|
- prop="maxTime"
|
|
|
- label="Max"
|
|
|
- align="center"
|
|
|
- width="100">
|
|
|
- </ElTableColumn>
|
|
|
- <ElTableColumn
|
|
|
- prop="minTime"
|
|
|
- label="Min"
|
|
|
- align="center"
|
|
|
- width="100">
|
|
|
- </ElTableColumn>
|
|
|
- <ElTableColumn
|
|
|
- prop="averageTime"
|
|
|
- label="Average"
|
|
|
- align="center"
|
|
|
- width="100">
|
|
|
- </ElTableColumn>
|
|
|
- <ElTableColumn
|
|
|
- prop="pipelineRecordId"
|
|
|
- label="流水线ID"
|
|
|
- align="center"
|
|
|
- width="100">
|
|
|
- </ElTableColumn>
|
|
|
- </ElTable>
|
|
|
- </ElTabPane>
|
|
|
</ElTabs>
|
|
|
</template>
|
|
|
|
|
|
@@ -744,6 +760,7 @@ export default {
|
|
|
createTestCaseForm: {
|
|
|
projectId: -1,
|
|
|
title: '',
|
|
|
+ taskId: '',
|
|
|
},
|
|
|
stepsDrawer: false,
|
|
|
detailTestCaseInfo: [],
|
|
|
@@ -757,13 +774,15 @@ export default {
|
|
|
deployHistoryInfo: {},
|
|
|
deployHistoryDrawer: false,
|
|
|
autoTestResult: [],
|
|
|
+ taskIdList: [],
|
|
|
};
|
|
|
},
|
|
|
async mounted() {
|
|
|
this.currentProjectId = this.$store.state.workspace.currentProjectId;
|
|
|
this.apitests = await APITestAPI.getAPITestInfosByProjectId(this.$store.state.workspace.currentProjectId);
|
|
|
this.testcases = await FuncTestAPI.getTestCases(this.$store.state.workspace.currentProjectId);
|
|
|
- this.autoTestResult = await AutoTestAPI.getAutoTestResultByProjectId(this.$store.state.workspace.currentProjectId);
|
|
|
+ this.taskIdList = await FuncTestAPI.getTreeIdList(this.$store.state.workspace.currentProjectId);
|
|
|
+ // this.autoTestResult = await AutoTestAPI.getAutoTestResultByProjectId(this.$store.state.workspace.currentProjectId);
|
|
|
},
|
|
|
methods: {
|
|
|
async handleClick(action, id) {
|
|
|
@@ -800,6 +819,8 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.testResults = await APITestAPI.getAPITestResultByTestId(id);
|
|
|
+ this.autoTestResult = await AutoTestAPI.getAutoTestResultByProjectId(this.$store.state.workspace.currentProjectId, id);
|
|
|
+ console.log(this.autoTestResult);
|
|
|
this.detailDrawer = true;
|
|
|
break;
|
|
|
}
|
|
|
@@ -1005,7 +1026,9 @@ export default {
|
|
|
this.$refs.createTestCaseForm.validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
this.createTestCaseForm.projectId = this.$store.state.workspace.currentProjectId;
|
|
|
- await FuncTestAPI.createTestCase(this.createTestCaseForm.projectId, this.createTestCaseForm.title);
|
|
|
+ await FuncTestAPI.createTestCase(
|
|
|
+ this.createTestCaseForm.projectId, this.createTestCaseForm.title, this.createTestCaseForm.taskId,
|
|
|
+ );
|
|
|
this.testcases = await FuncTestAPI.getTestCases(this.$store.state.workspace.currentProjectId);
|
|
|
this.$refs.createTestCaseForm.resetFields();
|
|
|
this.showTestCaseCreateModel = false;
|