parent
66473ae258
commit
e6d2e1bf4d
|
@ -4,7 +4,7 @@
|
|||
|
||||
<select id="list" resultType="io.metersphere.track.dto.TestPlanReportDTO"
|
||||
parameterType="io.metersphere.track.request.report.QueryTestPlanReportRequest">
|
||||
SELECT tpr.id AS id, tpr.`name` AS `name`, tp.`name` AS testPlanName, tpr.creator AS creator, tpr.create_time AS createTime,tpr.trigger_Mode AS triggerMode
|
||||
SELECT tpr.id AS id, tpr.`name` AS `name`, tp.`name` AS testPlanName, tpr.creator AS creator, tpr.create_time AS createTime,tpr.trigger_Mode AS triggerMode,tpr.status AS status
|
||||
FROM test_plan tp
|
||||
INNER JOIN test_plan_report tpr on tp.id = tpr.test_plan_id
|
||||
<where>
|
||||
|
|
|
@ -20,6 +20,7 @@ public class TestPlanReportDTO {
|
|||
private String creator;
|
||||
private long createTime;
|
||||
private String triggerMode;
|
||||
private String status;
|
||||
|
||||
private TestCaseReportAdvanceStatusResultDTO executeResult;
|
||||
private List<TestCaseReportModuleResultDTO> moduleExecuteResult;
|
||||
|
|
|
@ -109,7 +109,6 @@ public class TestPlanReportService {
|
|||
TestPlanReport testPlanReport = new TestPlanReport();
|
||||
testPlanReport.setTestPlanId(planId);
|
||||
testPlanReport.setId(testPlanReportID);
|
||||
testPlanReport.setStatus(APITestStatus.Starting.name());
|
||||
testPlanReport.setCreateTime(System.currentTimeMillis());
|
||||
testPlanReport.setUpdateTime(System.currentTimeMillis());
|
||||
try {
|
||||
|
@ -136,6 +135,12 @@ public class TestPlanReportService {
|
|||
testPlanReport.setIsPerformanceExecuting(true);
|
||||
}
|
||||
testPlanReport.setPrincipal(testPlan.getPrincipal());
|
||||
|
||||
if(testPlanReport.getIsScenarioExecuting() || testPlanReport.getIsApiCaseExecuting() || testPlanReport.getIsPerformanceExecuting()){
|
||||
testPlanReport.setStatus(APITestStatus.Starting.name());
|
||||
}else {
|
||||
testPlanReport.setStatus(APITestStatus.Completed.name());
|
||||
}
|
||||
testPlanReportMapper.insert(testPlanReport);
|
||||
|
||||
TestPlanReportDataWithBLOBs testPlanReportData = new TestPlanReportDataWithBLOBs();
|
||||
|
@ -327,6 +332,7 @@ public class TestPlanReportService {
|
|||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}else {
|
||||
}
|
||||
testPlanReportMapper.updateByPrimaryKey(report);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,16 @@
|
|||
<report-trigger-mode-item :trigger-mode="scope.row.triggerMode"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" :label="$t('commons.status')">
|
||||
<template v-slot:default="scope">
|
||||
<ms-tag v-if="scope.row.status == 'RUNNING'" type="success" effect="plain" :content="'Running'"/>
|
||||
<ms-tag v-else-if="scope.row.status == 'COMPLETED'||scope.row.status == 'SUCCESS'||scope.row.status == 'FAILED'" type="info" effect="plain" :content="'Completed'"/>
|
||||
<ms-tag v-else type="effect" effect="plain" :content="scope.row.status"/>
|
||||
<!-- <el-tag size="mini" type="success" v-if="row.status === 'Running'">{{ row.status }}</el-tag>-->
|
||||
<!-- <el-tag size="mini" type="info" v-else-if="row.status === 'Completed'">{{ row.status }}</el-tag>-->
|
||||
<!-- <el-tag size="mini" type="info" v-if="row.status === 'Completed'">{{ row.status }}</el-tag>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="150" :label="$t('commons.operating')">
|
||||
<template v-slot:default="scope">
|
||||
<ms-table-operator-button :tip="$t('test_track.plan_view.view_report')" icon="el-icon-document"
|
||||
|
@ -45,13 +55,14 @@ import {TEST_PLAN_REPORT_CONFIGS} from "../../../common/components/search/search
|
|||
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||
import TestPlanReportView from "@/business/components/track/report/components/TestPlanReportView";
|
||||
import ReportTriggerModeItem from "@/business/components/common/tableItem/ReportTriggerModeItem";
|
||||
import MsTag from "@/business/components/common/components/MsTag";
|
||||
|
||||
export default {
|
||||
name: "TestPlanReportList",
|
||||
components: {
|
||||
TestPlanReportView,
|
||||
MsTableOperator, MsTableOperatorButton, MsTableHeader, MsTablePagination,
|
||||
ReportTriggerModeItem
|
||||
ReportTriggerModeItem,MsTag
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue