fix(测试跟踪): 测试计划报告分享ui用例显示的是接口用例
--bug=1015059 --user=宋昌昌 【测试跟踪】测试计划报告,UI场景结果显示在了接口场景结果里 https://www.tapd.cn/55049933/s/1209991
This commit is contained in:
parent
43d2ca028e
commit
d190e1b679
|
@ -15,10 +15,7 @@ import io.metersphere.commons.constants.ResourceStatusEnum;
|
||||||
import io.metersphere.commons.utils.PageUtils;
|
import io.metersphere.commons.utils.PageUtils;
|
||||||
import io.metersphere.commons.utils.Pager;
|
import io.metersphere.commons.utils.Pager;
|
||||||
import io.metersphere.controller.request.resourcepool.QueryResourcePoolRequest;
|
import io.metersphere.controller.request.resourcepool.QueryResourcePoolRequest;
|
||||||
import io.metersphere.dto.LogDetailDTO;
|
import io.metersphere.dto.*;
|
||||||
import io.metersphere.dto.ReportDTO;
|
|
||||||
import io.metersphere.dto.RequestResult;
|
|
||||||
import io.metersphere.dto.TestResourcePoolDTO;
|
|
||||||
import io.metersphere.performance.base.*;
|
import io.metersphere.performance.base.*;
|
||||||
import io.metersphere.performance.dto.LoadTestExportJmx;
|
import io.metersphere.performance.dto.LoadTestExportJmx;
|
||||||
import io.metersphere.performance.dto.MetricData;
|
import io.metersphere.performance.dto.MetricData;
|
||||||
|
@ -54,6 +51,8 @@ public class ShareController {
|
||||||
@Resource
|
@Resource
|
||||||
TestPlanScenarioCaseService testPlanScenarioCaseService;
|
TestPlanScenarioCaseService testPlanScenarioCaseService;
|
||||||
@Resource
|
@Resource
|
||||||
|
TestPlanUiScenarioCaseService testPlanUiScenarioCaseService;
|
||||||
|
@Resource
|
||||||
ApiScenarioReportService apiScenarioReportService;
|
ApiScenarioReportService apiScenarioReportService;
|
||||||
@Resource
|
@Resource
|
||||||
TestPlanLoadCaseService testPlanLoadCaseService;
|
TestPlanLoadCaseService testPlanLoadCaseService;
|
||||||
|
@ -160,6 +159,30 @@ public class ShareController {
|
||||||
return testPlanScenarioCaseService.getUnExecuteCases(planId);
|
return testPlanScenarioCaseService.getUnExecuteCases(planId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/test/plan/uiScenario/case/list/failure/{shareId}/{planId}")
|
||||||
|
public List<TestPlanFailureUiScenarioDTO> getUiScenarioFailureList(@PathVariable String shareId, @PathVariable String planId) {
|
||||||
|
shareInfoService.validate(shareId, planId);
|
||||||
|
return testPlanUiScenarioCaseService.getFailureCases(planId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/test/plan/uiScenario/case/list/all/{shareId}/{planId}")
|
||||||
|
public List<TestPlanFailureUiScenarioDTO> getUiScenarioAllList(@PathVariable String shareId, @PathVariable String planId) {
|
||||||
|
shareInfoService.validate(shareId, planId);
|
||||||
|
return testPlanUiScenarioCaseService.getAllCases(planId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/test/plan/uiScenario/case/list/errorReport/{shareId}/{planId}")
|
||||||
|
public List<TestPlanFailureUiScenarioDTO> getUiScenarioErrorReportList(@PathVariable String shareId, @PathVariable String planId) {
|
||||||
|
shareInfoService.validate(shareId, planId);
|
||||||
|
return testPlanUiScenarioCaseService.getErrorReportCases(planId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/test/plan/uiScenario/case/list/unExecute/{shareId}/{planId}")
|
||||||
|
public List<TestPlanFailureUiScenarioDTO> geUitUnExecuteScenarioCases(@PathVariable String shareId, @PathVariable String planId) {
|
||||||
|
shareInfoService.validate(shareId, planId);
|
||||||
|
return testPlanUiScenarioCaseService.getUnExecuteCases(planId);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/api/definition/report/getReport/{shareId}/{testId}")
|
@GetMapping("/api/definition/report/getReport/{shareId}/{testId}")
|
||||||
public APIReportResult getApiReport(@PathVariable String shareId, @PathVariable String testId) {
|
public APIReportResult getApiReport(@PathVariable String shareId, @PathVariable String testId) {
|
||||||
// shareInfoService.apiReportValidate(shareId, testId);
|
// shareInfoService.apiReportValidate(shareId, testId);
|
||||||
|
|
|
@ -90,6 +90,10 @@ import {
|
||||||
getPlanUiScenarioFailureCase,
|
getPlanUiScenarioFailureCase,
|
||||||
getPlanUiScenarioUnExecuteCase,
|
getPlanUiScenarioUnExecuteCase,
|
||||||
getPlanUiScenarioAllCase,
|
getPlanUiScenarioAllCase,
|
||||||
|
getSharePlanUiScenarioAllCase,
|
||||||
|
getSharePlanUiScenarioUnExecuteCase,
|
||||||
|
getSharePlanUiScenarioErrorReportCase,
|
||||||
|
getSharePlanUiScenarioFailureCase,
|
||||||
} from "@/network/test-plan";
|
} from "@/network/test-plan";
|
||||||
import MsTable from "@/business/components/common/components/table/MsTable";
|
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||||
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
||||||
|
@ -148,7 +152,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.scenarioCases = this.report.scenarioFailureCases ? this.report.scenarioFailureCases : [];
|
this.scenarioCases = this.report.scenarioFailureCases ? this.report.scenarioFailureCases : [];
|
||||||
}
|
}
|
||||||
} else if (this.isShare) {
|
} else if (this.isShare && !this.isUi) {
|
||||||
if (this.isErrorReport) {
|
if (this.isErrorReport) {
|
||||||
this.result = getSharePlanScenarioErrorReportCase(this.shareId, this.planId, (data) => {
|
this.result = getSharePlanScenarioErrorReportCase(this.shareId, this.planId, (data) => {
|
||||||
this.scenarioCases = data;
|
this.scenarioCases = data;
|
||||||
|
@ -166,6 +170,24 @@ export default {
|
||||||
this.scenarioCases = data;
|
this.scenarioCases = data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (this.isShare && this.isUi) {
|
||||||
|
if (this.isErrorReport) {
|
||||||
|
this.result = getSharePlanUiScenarioErrorReportCase(this.shareId, this.planId, (data) => {
|
||||||
|
this.scenarioCases = data;
|
||||||
|
});
|
||||||
|
} else if (this.isUnExecute) {
|
||||||
|
this.result = getSharePlanUiScenarioUnExecuteCase(this.shareId, this.planId, (data) => {
|
||||||
|
this.scenarioCases = data;
|
||||||
|
});
|
||||||
|
} else if (this.isAll) {
|
||||||
|
this.result = getSharePlanUiScenarioAllCase(this.shareId, this.planId, (data) => {
|
||||||
|
this.scenarioCases = data;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.result = getSharePlanUiScenarioFailureCase(this.shareId, this.planId, (data) => {
|
||||||
|
this.scenarioCases = data;
|
||||||
|
});
|
||||||
|
}
|
||||||
} else if (this.isUi) {
|
} else if (this.isUi) {
|
||||||
if (this.isErrorReport) {
|
if (this.isErrorReport) {
|
||||||
this.result = getPlanUiScenarioErrorReportCase(this.planId, (data) => {
|
this.result = getPlanUiScenarioErrorReportCase(this.planId, (data) => {
|
||||||
|
|
|
@ -94,6 +94,21 @@ export function getSharePlanScenarioUnExecuteCase(shareId, planId, callback) {
|
||||||
return planId ? baseGet('/share/test/plan/scenario/case/list/unExecute/' + shareId + '/' + planId, callback) : {};
|
return planId ? baseGet('/share/test/plan/scenario/case/list/unExecute/' + shareId + '/' + planId, callback) : {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getSharePlanUiScenarioFailureCase(shareId, planId, callback) {
|
||||||
|
return planId ? baseGet('/share/test/plan/uiScenario/case/list/failure/' + shareId + '/' + planId, callback) : {};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getSharePlanUiScenarioAllCase(shareId, planId, callback) {
|
||||||
|
return planId ? baseGet('/share/test/plan/uiScenario/case/list/all/' + shareId + '/' + planId, callback) : {};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getSharePlanUiScenarioErrorReportCase(shareId, planId, callback) {
|
||||||
|
return planId ? baseGet('/share/test/plan/uiScenario/case/list/errorReport/' + shareId + '/' + planId, callback) : {};
|
||||||
|
}
|
||||||
|
export function getSharePlanUiScenarioUnExecuteCase(shareId, planId, callback) {
|
||||||
|
return planId ? baseGet('/share/test/plan/uiScenario/case/list/unExecute/' + shareId + '/' + planId, callback) : {};
|
||||||
|
}
|
||||||
|
|
||||||
export function getPlanApiFailureCase(planId, callback) {
|
export function getPlanApiFailureCase(planId, callback) {
|
||||||
return planId ? baseGet('/test/plan/api/case/list/failure/' + planId, callback) : {};
|
return planId ? baseGet('/test/plan/api/case/list/failure/' + planId, callback) : {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue