feat: 测试计划报告添加所有用例

This commit is contained in:
chenjianxing 2021-08-23 16:16:08 +08:00 committed by jianxing
parent 977af64f17
commit fbbeff55ea
23 changed files with 707 additions and 169 deletions

View File

@ -40,6 +40,7 @@ public class TestPlanUtils {
addToReportStatusResultList(resultMap, statusResult, TestPlanTestCaseStatus.Pass.name());
addToReportStatusResultList(resultMap, statusResult, TestPlanTestCaseStatus.Failure.name());
addToReportStatusResultList(resultMap, statusResult, "error");
addToReportStatusResultList(resultMap, statusResult, "run");
addToReportStatusResultList(resultMap, statusResult, "Fail");
addToReportStatusResultList(resultMap, statusResult, "success");
addToReportStatusResultList(resultMap, statusResult, "Success");

View File

@ -8,9 +8,13 @@ import io.metersphere.api.service.ApiDefinitionService;
import io.metersphere.api.service.ApiScenarioReportService;
import io.metersphere.api.service.ShareInfoService;
import io.metersphere.base.domain.IssuesDao;
import io.metersphere.base.domain.LoadTestReportWithBLOBs;
import io.metersphere.performance.base.ReportTimeInfo;
import io.metersphere.performance.service.PerformanceReportService;
import io.metersphere.track.dto.TestPlanCaseDTO;
import io.metersphere.track.dto.TestPlanLoadCaseDTO;
import io.metersphere.track.dto.TestPlanSimpleReportDTO;
import io.metersphere.track.request.testplan.LoadCaseReportRequest;
import io.metersphere.track.service.*;
import org.springframework.web.bind.annotation.*;
@ -41,6 +45,8 @@ public class ShareController {
IssuesService issuesService;
@Resource
ShareInfoService shareInfoService;
@Resource
PerformanceReportService performanceReportService;
@GetMapping("/issues/plan/get/{shareId}/{planId}")
public List<IssuesDao> getIssuesByPlanoId(@PathVariable String shareId, @PathVariable String planId) {
@ -66,24 +72,48 @@ public class ShareController {
return testPlanTestCaseService.getFailureCases(planId);
}
@GetMapping("/test/plan/case/list/all/{shareId}/{planId}")
public List<TestPlanCaseDTO> getAllCases(@PathVariable String shareId, @PathVariable String planId) {
shareInfoService.validate(shareId, planId);
return testPlanTestCaseService.getAllCases(planId);
}
@GetMapping("/test/plan/load/case/list/failure/{shareId}/{planId}")
public List<TestPlanLoadCaseDTO> getLoadFailureCases(@PathVariable String shareId, @PathVariable String planId) {
shareInfoService.validate(shareId, planId);
return testPlanLoadCaseService.getFailureCases(planId);
}
@GetMapping("/test/plan/load/case/list/all/{shareId}/{planId}")
public List<TestPlanLoadCaseDTO> getLoadAllCases(@PathVariable String shareId, @PathVariable String planId) {
shareInfoService.validate(shareId, planId);
return testPlanLoadCaseService.getAllCases(planId);
}
@GetMapping("/test/plan/api/case/list/failure/{shareId}/{planId}")
public List<TestPlanFailureApiDTO> getApiFailureList(@PathVariable String shareId, @PathVariable String planId) {
shareInfoService.validate(shareId, planId);
return testPlanApiCaseService.getFailureCases(planId);
}
@GetMapping("/test/plan/api/case/list/all/{shareId}/{planId}")
public List<TestPlanFailureApiDTO> getApiAllList(@PathVariable String shareId, @PathVariable String planId) {
shareInfoService.validate(shareId, planId);
return testPlanApiCaseService.getAllCases(planId);
}
@GetMapping("/test/plan/scenario/case/list/failure/{shareId}/{planId}")
public List<TestPlanFailureScenarioDTO> getScenarioFailureList(@PathVariable String shareId, @PathVariable String planId) {
shareInfoService.validate(shareId, planId);
return testPlanScenarioCaseService.getFailureCases(planId);
}
@GetMapping("/test/plan/scenario/case/list/all/{shareId}/{planId}")
public List<TestPlanFailureScenarioDTO> getScenarioAllList(@PathVariable String shareId, @PathVariable String planId) {
shareInfoService.validate(shareId, planId);
return testPlanScenarioCaseService.getAllCases(planId);
}
@GetMapping("/api/definition/report/getReport/{shareId}/{testId}")
public APIReportResult getApiReport(@PathVariable String shareId, @PathVariable String testId) {
shareInfoService.apiReportValidate(shareId, testId);
@ -95,4 +125,24 @@ public class ShareController {
shareInfoService.scenarioReportValidate(shareId, reportId);
return apiScenarioReportService.get(reportId);
}
@GetMapping("/performance/report/{shareId}/{reportId}")
public LoadTestReportWithBLOBs getLoadTestReport(@PathVariable String shareId, @PathVariable String reportId) {
//todo
return performanceReportService.getLoadTestReport(reportId);
}
@GetMapping("/performance/report/content/report_time/{shareId}/{reportId}")
public ReportTimeInfo getReportTimeInfo(@PathVariable String shareId, @PathVariable String reportId) {
// todo
return performanceReportService.getReportTimeInfo(reportId);
}
@PostMapping("/test/plan/load/case/report/exist/{shareId}")
public Boolean isExistReport(@PathVariable String shareId, @RequestBody LoadCaseReportRequest request) {
// testPlanLoadCaseService todo checkout
return testPlanLoadCaseService.isExistReport(request);
}
}

View File

@ -38,6 +38,11 @@ public class TestPlanApiCaseController {
return testPlanApiCaseService.getFailureCases(planId);
}
@GetMapping("/list/all/{planId}")
public List<TestPlanFailureApiDTO> getAllList(@PathVariable String planId) {
return testPlanApiCaseService.getAllCases(planId);
}
@PostMapping("/selectAllTableRows")
public List<TestPlanApiCaseDTO> selectAllTableRows(@RequestBody TestPlanApiCaseBatchRequest request) {
return testPlanApiCaseService.selectAllTableRows(request);

View File

@ -95,4 +95,9 @@ public class TestPlanLoadCaseController {
public List<TestPlanLoadCaseDTO> getFailureCases(@PathVariable String planId) {
return testPlanLoadCaseService.getFailureCases(planId);
}
@GetMapping("/list/all/{planId}")
public List<TestPlanLoadCaseDTO> getAllCases(@PathVariable String planId) {
return testPlanLoadCaseService.getAllCases(planId);
}
}

View File

@ -36,6 +36,11 @@ public class TestPlanScenarioCaseController {
return testPlanScenarioCaseService.getFailureCases(planId);
}
@GetMapping("/list/all/{planId}")
public List<TestPlanFailureScenarioDTO> getAllList(@PathVariable String planId) {
return testPlanScenarioCaseService.getAllCases(planId);
}
@PostMapping("/selectAllTableRows")
public List<ApiScenarioDTO> selectAllTableRows(@RequestBody TestPlanScenarioCaseBatchRequest request) {
return testPlanScenarioCaseService.selectAllTableRows(request);

View File

@ -134,4 +134,9 @@ public class TestPlanTestCaseController {
public List<TestPlanCaseDTO> getFailureCases(@PathVariable String planId) {
return testPlanTestCaseService.getFailureCases(planId);
}
@GetMapping("/list/all/{planId}")
public List<TestPlanCaseDTO> getAllCases(@PathVariable String planId) {
return testPlanTestCaseService.getAllCases(planId);
}
}

View File

@ -1,5 +1,6 @@
package io.metersphere.track.dto;
import io.metersphere.base.domain.LoadTestReportWithBLOBs;
import io.metersphere.base.domain.TestPlanLoadCase;
import lombok.Getter;
import lombok.Setter;
@ -13,4 +14,13 @@ public class TestPlanLoadCaseDTO extends TestPlanLoadCase {
private String caseStatus;
private String num;
private String name;
private ReportDTO response;
@Getter
@Setter
public static class ReportDTO extends LoadTestReportWithBLOBs {
private long duration;
private long startTime;
private long endTime;
}
}

View File

@ -25,10 +25,7 @@ import io.metersphere.base.mapper.ext.*;
import io.metersphere.commons.constants.*;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.user.SessionUser;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.commons.utils.MathUtils;
import io.metersphere.commons.utils.ServiceUtils;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.commons.utils.*;
import io.metersphere.dto.BaseSystemConfigDTO;
import io.metersphere.dto.IssueTemplateDao;
import io.metersphere.i18n.Translator;
@ -38,7 +35,9 @@ import io.metersphere.log.vo.OperatingLogDetails;
import io.metersphere.log.vo.track.TestPlanReference;
import io.metersphere.notice.sender.NoticeModel;
import io.metersphere.notice.service.NoticeSendService;
import io.metersphere.performance.base.ReportTimeInfo;
import io.metersphere.performance.request.RunTestPlanRequest;
import io.metersphere.performance.service.PerformanceReportService;
import io.metersphere.performance.service.PerformanceTestService;
import io.metersphere.service.IssueTemplateService;
import io.metersphere.service.ScheduleService;
@ -49,6 +48,7 @@ import io.metersphere.track.dto.*;
import io.metersphere.track.request.testcase.PlanCaseRelevanceRequest;
import io.metersphere.track.request.testcase.QueryTestPlanRequest;
import io.metersphere.track.request.testplan.AddTestPlanRequest;
import io.metersphere.track.request.testplan.LoadCaseReportRequest;
import io.metersphere.track.request.testplan.LoadCaseRequest;
import io.metersphere.track.request.testplan.TestplanRunRequest;
import io.metersphere.track.request.testplancase.QueryTestPlanCaseRequest;
@ -171,6 +171,8 @@ public class TestPlanService {
private ApiDefinitionService apiDefinitionService;
@Resource
private IssueTemplateService issueTemplateService;
@Resource
private PerformanceReportService performanceReportService;
private final ExecutorService executorService = Executors.newFixedThreadPool(20);
@ -1452,6 +1454,25 @@ public class TestPlanService {
List<TestPlanLoadCaseDTO> allCases = null;
if (checkReportConfig(config, "load", "all")) {
allCases = testPlanLoadCaseService.getAllCases(planId);
allCases.forEach(item -> {
LoadCaseReportRequest request = new LoadCaseReportRequest();
String reportId = item.getLoadReportId();
request.setTestPlanLoadCaseId(item.getId());
request.setReportId(reportId);
Boolean existReport = testPlanLoadCaseService.isExistReport(request);
if (existReport) {
LoadTestReportWithBLOBs loadTestReport = performanceReportService.getLoadTestReport(reportId);
ReportTimeInfo reportTimeInfo = performanceReportService.getReportTimeInfo(reportId);
TestPlanLoadCaseDTO.ReportDTO reportDTO = new TestPlanLoadCaseDTO.ReportDTO();
if (loadTestReport != null) {
BeanUtils.copyBean(reportDTO, loadTestReport);
}
if (reportTimeInfo != null) {
BeanUtils.copyBean(reportDTO, reportTimeInfo);
}
item.setResponse(reportDTO);
}
});
report.setLoadAllTestCases(allCases);
}
if (checkReportConfig(config, "load", "failure")) {

View File

@ -153,6 +153,13 @@
import echarts from "echarts";
import MsChart from "@/business/components/common/chart/MsChart";
import {findThreadGroup} from "@/business/components/performance/test/model/ThreadGroup";
import {
getPerformanceJmxContent,
getPerformanceLoadConfig,
getPerformanceReport, getSharePerformanceJmxContent,
getSharePerformanceLoadConfig,
getSharePerformanceReport
} from "@/network/load-test";
const HANDLER = "handler";
const THREAD_GROUP_TYPE = "tgType";
@ -181,7 +188,7 @@ const hexToRgb = function (hex) {
export default {
name: "MsPerformancePressureConfig",
components: {MsChart},
props: ['report'],
props: ['report', 'isShare', 'shareId', 'planReportTemplate'],
data() {
return {
result: {},
@ -276,59 +283,104 @@ export default {
if (!this.report.id) {
return;
}
this.result = this.$get("/performance/report/" + this.report.id, res => {
let data = res.data;
if (data) {
if (data.loadConfiguration) {
let d = JSON.parse(data.loadConfiguration);
this.calculateLoadConfiguration(d);
if (this.planReportTemplate) {
this.handleGetLoadConfig(this.planReportTemplate);
} else if (this.isShare){
this.result = getSharePerformanceReport(this.shareId, this.report.id, data => {
this.handleGetLoadConfig(data);
});
} else {
this.result = getPerformanceReport(this.report.id, data => {
this.handleGetLoadConfig(data);
});
}
},
handleGetLoadConfig(data) {
if (data) {
if (data.loadConfiguration) {
let d = JSON.parse(data.loadConfiguration);
this.calculateLoadConfiguration(d);
} else {
if (this.planReportTemplate) {
//todo
if (this.planReportTemplate.loadConfig) {
let data = JSON.parse(this.planReportTemplate.loadConfig);
this.calculateLoadConfiguration(data);
}
} else if (this.isShare){
this.result = getSharePerformanceLoadConfig(this.shareId, this.report.id, data => {
if (data) {
data = JSON.parse(data);
this.calculateLoadConfiguration(data);
}
});
} else {
this.$get('/performance/get-load-config/' + this.report.id, (response) => {
if (response.data) {
let data = JSON.parse(response.data);
this.result = getPerformanceLoadConfig(this.report.id, data => {
if (data) {
data = JSON.parse(data);
this.calculateLoadConfiguration(data);
}
});
}
} else {
this.$error(this.$t('report.not_exist'));
}
});
} else {
this.$error(this.$t('report.not_exist'));
}
},
getJmxContent() {
// console.log(this.report.testId);
if (!this.report.testId) {
return;
}
let threadGroups = [];
this.result = this.$get('/performance/report/get-jmx-content/' + this.report.id)
.then((response) => {
let d = response.data.data;
threadGroups = threadGroups.concat(findThreadGroup(d.jmx, d.name));
threadGroups.forEach(tg => {
tg.options = {};
});
this.threadGroups = threadGroups;
this.getLoadConfig();
//
if (!threadGroups || threadGroups.length === 0) {
this.result = this.$get('/performance/get-jmx-content/' + this.report.testId)
.then((response) => {
response.data.data.forEach(d => {
threadGroups = threadGroups.concat(findThreadGroup(d.jmx, d.name));
threadGroups.forEach(tg => {
tg.options = {};
});
this.threadGroups = threadGroups;
this.getLoadConfig();
});
})
.catch(() => {
});
}
}).catch(() => {
if (this.planReportTemplate) {
//todo
if (this.planReportTemplate.jmxContent) {
this.calculateLoadConfiguration(this.planReportTemplate.jmxContent);
}
} else if (this.isShare){
this.result = getSharePerformanceJmxContent(this.shareId, this.report.id, data => {
this.handleGetJmxContent(data);
});
} else {
this.result = getPerformanceJmxContent(this.report.id, data => {
this.handleGetJmxContent(data);
});
}
},
handleGetJmxContent(d) {
let threadGroups = [];
threadGroups = threadGroups.concat(findThreadGroup(d.jmx, d.name));
threadGroups.forEach(tg => {
tg.options = {};
});
this.threadGroups = threadGroups;
this.getLoadConfig();
//
if (!threadGroups || threadGroups.length === 0) {
if (this.planReportTemplate) {
//todo
if (this.planReportTemplate.jmxContentFix) {
this.calculateLoadConfiguration(this.planReportTemplate.jmxContentFix);
}
} else if (this.isShare){
this.result = getSharePerformanceJmxContent(this.shareId, this.report.id, data => {
data.forEach(d => this._handleGetJmxContent(d, threadGroups));
});
} else {
this.result = getPerformanceJmxContent(this.report.id, data => {
data.forEach(d => this._handleGetJmxContent(d, threadGroups));
});
}
}
},
_handleGetJmxContent(d, threadGroups) {
threadGroups = threadGroups.concat(findThreadGroup(d.jmx, d.name));
threadGroups.forEach(tg => {
tg.options = {};
});
this.threadGroups = threadGroups;
this.getLoadConfig();
},
calculateTotalChart() {
let handler = this;

View File

@ -4,7 +4,7 @@
<el-card v-loading="result.loading" v-if="show">
<el-row>
<el-col :span="16">
<el-row>
<el-row v-if="!isPlanReport">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/performance/test/' + this.projectId }">{{ projectName }}
</el-breadcrumb-item>
@ -13,7 +13,7 @@
<el-breadcrumb-item>{{ reportName }}</el-breadcrumb-item>
</el-breadcrumb>
</el-row>
<el-row class="ms-report-view-btns">
<el-row class="ms-report-view-btns" v-if="!isPlanReport">
<el-button :disabled="isReadOnly || report.status !== 'Running'" type="primary" plain size="mini"
@click="dialogFormVisible=true">
{{ $t('report.test_stop_now') }}
@ -49,7 +49,8 @@
<div ref="resume">
<el-tabs v-model="active">
<el-tab-pane :label="$t('load_test.pressure_config')">
<ms-performance-pressure-config :is-read-only="true" :report="report"/>
<ms-performance-pressure-config :is-share="isShare" :plan-report-template="planReportTemplate"
:share-id="shareId" :is-read-only="true" :report="report"/>
</el-tab-pane>
<el-tab-pane :label="$t('report.test_overview')">
<ms-report-test-overview :report="report" ref="testOverview"/>
@ -105,6 +106,7 @@ import MsMainContainer from "@/business/components/common/components/MsMainConta
import MsPerformancePressureConfig from "@/business/components/performance/report/components/PerformancePressureConfig";
import MonitorCard from "@/business/components/performance/report/components/MonitorCard";
import MsReportTestDetails from '@/business/components/performance/report/components/TestDetails';
import {getPerformanceReport, getPerformanceReportTime, getSharePerformanceReport} from "@/network/load-test";
export default {
@ -150,6 +152,10 @@ export default {
type: Boolean,
default: false
},
isPlanReport: Boolean,
isShare: Boolean,
shareId: String,
planReportTemplate: {}
},
watch: {
reportId() {
@ -158,6 +164,9 @@ export default {
},
methods: {
initBreadcrumb(callback) {
if (this.isPlanReport) {
return;
}
if (this.reportId) {
this.result = this.$get("/performance/report/test/pro/info/" + this.reportId, res => {
let data = res.data;
@ -179,23 +188,40 @@ export default {
this.clearData();
return;
}
if (this.reportId) {
this.result = this.$get("/performance/report/content/report_time/" + this.reportId)
.then(res => {
let data = res.data.data;
if (data) {
this.startTime = data.startTime;
this.endTime = data.endTime;
let duration = data.duration;
this.minutes = Math.floor(duration / 60);
this.seconds = duration % 60;
}
if (this.planReportTemplate) {
this.handleInitReportTimeInfo(this.planReportTemplate);
} else if (this.isShare) {
if (this.reportId) {
this.result = getPerformanceReportTime(this.shareId, this.reportId)
.then((res) => {
this.handleInitReportTimeInfo(res.data.data);
}).catch(() => {
this.clearData();
});
}
} else {
if (this.reportId) {
this.result = getPerformanceReportTime(this.reportId).then(res => {
this.handleInitReportTimeInfo(res.data.data);
}).catch(() => {
this.clearData();
});
}
}
},
handleInitReportTimeInfo(data) {
if (data) {
this.startTime = data.startTime;
this.endTime = data.endTime;
let duration = data.duration;
this.minutes = Math.floor(duration / 60);
this.seconds = duration % 60;
}
},
initWebSocket() {
if (this.isPlanReport) {
return;
}
let protocol = "ws://";
if (window.location.protocol === 'https:') {
protocol = "wss://";
@ -337,24 +363,34 @@ export default {
},
init() {
this.clearData();
this.result = this.$get("/performance/report/" + this.reportId, res => {
let data = res.data;
if (data) {
this.status = data.status;
this.$set(this.report, "id", this.reportId);
this.$set(this.report, "status", data.status);
this.$set(this.report, "testId", data.testId);
this.$set(this.report, "loadConfiguration", data.loadConfiguration);
this.checkReportStatus(data.status);
if (this.status === "Completed" || this.status === "Running") {
this.initReportTimeInfo();
}
this.initBreadcrumb();
this.initWebSocket();
} else {
this.$error(this.$t('report.not_exist'));
if (this.planReportTemplate) {
this.handleInit(this.planReportTemplate);
} else if (this.isShare){
this.result = getSharePerformanceReport(this.shareId, this.reportId, data => {
this.handleInit(data);
});
} else {
this.result = getPerformanceReport(this.reportId, data => {
this.handleInit(data);
});
}
},
handleInit(data) {
if (data) {
this.status = data.status;
this.$set(this.report, "id", this.reportId);
this.$set(this.report, "status", data.status);
this.$set(this.report, "testId", data.testId);
this.$set(this.report, "loadConfiguration", data.loadConfiguration);
this.checkReportStatus(data.status);
if (this.status === "Completed" || this.status === "Running") {
this.initReportTimeInfo();
}
});
this.initBreadcrumb();
this.initWebSocket();
} else {
this.$error(this.$t('report.not_exist'));
}
}
},
created() {

View File

@ -5,10 +5,11 @@
<api-result :api-result="report.apiResult"/>
</el-tab-pane>
<el-tab-pane v-if="failureEnable" label="失败用例" name="second">
<api-failure-result :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
<api-cases :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
</el-tab-pane>
<el-tab-pane label="所有用例" name="third">
<api-cases :is-all="true" :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
</el-tab-pane>
<!-- <el-tab-pane label="所有用例" name="fourth">所有用例</el-tab-pane>-->
</el-tabs>
</test-plan-report-container>
</template>
@ -18,10 +19,10 @@ import MsFormDivider from "@/business/components/common/components/MsFormDivider
import ApiResult from "@/business/components/track/plan/view/comonents/report/detail/component/ApiResult";
import TestPlanReportContainer
from "@/business/components/track/plan/view/comonents/report/detail/TestPlanReportContainer";
import ApiFailureResult from "@/business/components/track/plan/view/comonents/report/detail/component/ApiFailureResult";
import ApiCases from "@/business/components/track/plan/view/comonents/report/detail/component/ApiCases";
export default {
name: "TestPlanApiReport",
components: {ApiFailureResult, TestPlanReportContainer, ApiResult, MsFormDivider},
components: {ApiCases, TestPlanReportContainer, ApiResult, MsFormDivider},
data() {
return {
activeName: 'first'
@ -39,6 +40,10 @@ export default {
let disable = this.report.config && this.report.config.api.children.failure.enable === false;
return !disable;
},
allEnable() {
let disable = this.report.config && this.report.config.api.children.all.enable === false;
return !disable;
},
},
watch: {
resultEnable() {
@ -47,6 +52,9 @@ export default {
failureEnable() {
this.initActiveName();
},
allEnable() {
this.initActiveName();
},
},
mounted() {
this.initActiveName();
@ -57,6 +65,8 @@ export default {
this.activeName = 'first';
} else if (this.failureEnable) {
this.activeName = 'second';
} else if (this.allEnable) {
this.activeName = 'third';
}
},
handleClick(tab, event) {

View File

@ -5,12 +5,14 @@
<functional-result :function-result="report.functionResult"/>
</el-tab-pane>
<el-tab-pane v-if="failureEnable" label="失败用例" name="second">
<functional-failure-result :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
<functional-cases :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
</el-tab-pane>
<el-tab-pane v-if="issueEnable" label="缺陷列表" name="third">
<functional-issue-list :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
</el-tab-pane>
<!-- <el-tab-pane label="所有用例" name="fourth">所有用例</el-tab-pane>-->
<el-tab-pane label="所有用例" name="fourth">
<functional-cases v-if="allEnable" :is-all="true" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
</el-tab-pane>
</el-tabs>
</test-plan-report-container>
</template>
@ -18,15 +20,15 @@
<script>
import MsFormDivider from "@/business/components/common/components/MsFormDivider";
import FunctionalResult from "@/business/components/track/plan/view/comonents/report/detail/component/FunctionalResult";
import FunctionalFailureResult
from "@/business/components/track/plan/view/comonents/report/detail/component/FunctionalFailureResult";
import FunctionalCases
from "@/business/components/track/plan/view/comonents/report/detail/component/FunctionalCases";
import FunctionalIssueList
from "@/business/components/track/plan/view/comonents/report/detail/component/FunctionalIssueList";
import TestPlanReportContainer
from "@/business/components/track/plan/view/comonents/report/detail/TestPlanReportContainer";
export default {
name: "TestPlanFunctionalReport",
components: {TestPlanReportContainer, FunctionalIssueList, FunctionalFailureResult, FunctionalResult, MsFormDivider},
components: {TestPlanReportContainer, FunctionalIssueList, FunctionalCases, FunctionalResult, MsFormDivider},
data() {
return {
activeName: 'first'
@ -48,6 +50,10 @@ export default {
let disable = this.report.config && this.report.config.functional.children.issue.enable === false;
return !disable;
},
allEnable() {
let disable = this.report.config && this.report.config.functional.children.all.enable === false;
return !disable;
},
},
mounted() {
this.initActiveName();
@ -62,6 +68,9 @@ export default {
issueEnable() {
this.initActiveName();
},
allEnable() {
this.initActiveName();
},
},
methods: {
initActiveName() {
@ -71,6 +80,8 @@ export default {
this.activeName = 'second';
} else if (this.issueEnable) {
this.activeName = 'third';
} else if (this.allEnable) {
this.activeName = 'fourth';
}
},
handleClick(tab, event) {

View File

@ -7,7 +7,9 @@
<el-tab-pane v-if="failureEnable" label="失败用例" name="second">
<load-failure-result :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
</el-tab-pane>
<!-- <el-tab-pane label="所有用例" name="fourth">所有用例</el-tab-pane>-->
<el-tab-pane label="所有用例" name="third">
<load-all-result :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
</el-tab-pane>
</el-tabs>
</test-plan-report-container>
</template>
@ -19,10 +21,12 @@ import TestPlanReportContainer
from "@/business/components/track/plan/view/comonents/report/detail/TestPlanReportContainer";
import LoadFailureResult
from "@/business/components/track/plan/view/comonents/report/detail/component/LoadFailureResult";
import LoadAllResult from "@/business/components/track/plan/view/comonents/report/detail/component/LoadAllResult";
export default {
name: "TestPlanLoadReport",
components: {
LoadAllResult,
LoadFailureResult,
TestPlanReportContainer,
LoadResult, MsFormDivider},
@ -47,6 +51,10 @@ export default {
let disable = this.report.config && this.report.config.load.children.failure.enable === false;
return !disable;
},
allEnable() {
let disable = this.report.config && this.report.config.load.children.all.enable === false;
return !disable;
},
},
watch: {
resultEnable() {
@ -65,6 +73,8 @@ export default {
this.activeName = 'first';
} else if (this.failureEnable) {
this.activeName = 'second';
} else if (this.allEnable) {
this.activeName = 'third';
}
},
handleClick(tab, event) {

View File

@ -125,6 +125,10 @@ export default {
issue: {
enable: true,
name: '缺陷列表',
},
all: {
enable: true,
name: '所有用例',
}
}
},
@ -140,6 +144,10 @@ export default {
enable: true,
name: '失败用例',
},
all: {
enable: true,
name: '所有用例',
}
}
},
load: {
@ -154,6 +162,10 @@ export default {
enable: true,
name: '失败用例',
},
all: {
enable: true,
name: '所有用例',
}
}
}
};

View File

@ -40,13 +40,16 @@
:width="80"
:label="'执行结果'"
prop="lastResult">
<status-table-item :value="'Failure'"/>
<template v-slot:default="scope">
<status-table-item v-if="scope.row.execResult === 'success'" :value="'Pass'"/>
<status-table-item v-if="scope.row.execResult === 'error'" :value="'Failure'"/>
</template>
</ms-table-column>
</ms-table>
</el-col>
<el-col :span="17" v-if="apiCases.length > 0">
<el-card>
<ms-request-result-tail :response="response" ref="debugResult"/>
<ms-request-result-tail v-if="showResponse" :response="response" ref="debugResult"/>
</el-card>
</el-col>
</el-row>
@ -58,7 +61,12 @@ import PriorityTableItem from "../../../../../../common/tableItems/planview/Prio
import TypeTableItem from "../../../../../../common/tableItems/planview/TypeTableItem";
import MethodTableItem from "../../../../../../common/tableItems/planview/MethodTableItem";
import StatusTableItem from "../../../../../../common/tableItems/planview/StatusTableItem";
import {getPlanApiFailureCase, getSharePlanApiFailureCase} from "@/network/test-plan";
import {
getPlanApiAllCase,
getPlanApiFailureCase,
getSharePlanApiAllCase,
getSharePlanApiFailureCase
} from "@/network/test-plan";
import MsTable from "@/business/components/common/components/table/MsTable";
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
import {getApiReport, getShareApiReport} from "@/network/api";
@ -73,13 +81,15 @@ export default {
isTemplate: Boolean,
report: Object,
isShare: Boolean,
shareId: String
shareId: String,
isAll: Boolean
},
data() {
return {
apiCases: [],
result: {},
response: {}
response: {},
showResponse: true
}
},
mounted() {
@ -88,36 +98,67 @@ export default {
methods: {
getScenarioApiCase() {
if (this.isTemplate) {
this.apiCases = this.report.apiFailureResult;
if (this.apiCases && this.apiCases.length > 0) {
this.rowClick(this.apiCases[0]);
if (this.isAll) {
this.apiCases = this.report.apiAllCases;
} else {
this.apiCases = this.report.apiFailureResult;
}
this.handleDefaultClick();
} else if (this.isShare) {
this.result = getSharePlanApiFailureCase(this.shareId, this.planId, (data) => {
this.apiCases = data;
if (data && data.length > 0) {
this.rowClick(data[0]);
}
});
if (this.isAll) {
this.result = getSharePlanApiAllCase(this.shareId, this.planId, (data) => {
this.apiCases = data;
this.handleDefaultClick();
});
} else {
this.result = getSharePlanApiFailureCase(this.shareId, this.planId, (data) => {
this.apiCases = data;
this.handleDefaultClick();
});
}
} else {
this.result = getPlanApiFailureCase(this.planId, (data) => {
this.apiCases = data;
if (data && data.length > 0) {
this.rowClick(data[0]);
}
});
if (this.isAll) {
this.result = getPlanApiAllCase(this.planId, (data) => {
this.apiCases = data;
this.handleDefaultClick();
});
} else {
this.result = getPlanApiFailureCase(this.planId, (data) => {
this.apiCases = data;
this.handleDefaultClick();
});
}
}
},
handleDefaultClick() {
let data = this.apiCases;
if (data && data.length > 0) {
this.rowClick(data[0]);
}
},
rowClick(row) {
this.showResponse = true;
if (this.isTemplate) {
this.response = JSON.parse(row.response);
if (!row.response) {
this.showResponse = false;
} else {
this.response = JSON.parse(row.response);
}
} else if (this.isShare) {
getShareApiReport(this.shareId, row.id, (data) => {
this.response = JSON.parse(data.content);
if (!data || !data.content) {
this.showResponse = false;
} else {
this.response = JSON.parse(data.content);
}
});
} else {
getApiReport(row.id, (data) => {
this.response = JSON.parse(data.content);
if (!data || !data.content) {
this.showResponse = false;
} else {
this.response = JSON.parse(data.content);
}
});
}
}

View File

@ -2,10 +2,10 @@
<div>
<el-tabs type="card">
<el-tab-pane label="接口用例">
<api-case-failure-result :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
<api-case-failure-result :is-all="isAll" :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
</el-tab-pane>
<el-tab-pane label="场景用例">
<api-scenario-failure-result :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
<api-scenario-failure-result :is-all="isAll" :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
</el-tab-pane>
</el-tabs>
</div>
@ -21,7 +21,7 @@ import ApiScenarioFailureResult
import ApiCaseFailureResult
from "@/business/components/track/plan/view/comonents/report/detail/component/ApiCaseFailureResult";
export default {
name: "ApiFailureResult",
name: "ApiCases",
components: {
ApiCaseFailureResult,
ApiScenarioFailureResult, StatusTableItem, MethodTableItem, TypeTableItem, PriorityTableItem},
@ -30,7 +30,8 @@ export default {
isTemplate: Boolean,
isShare: Boolean,
report: {},
shareId: String
shareId: String,
isAll: Boolean
},
data() {
return {

View File

@ -40,12 +40,15 @@
:width="80"
:label="'执行结果'"
prop="lastResult">
<status-table-item :value="'Failure'"/>
<template v-slot:default="{row}">
<status-table-item v-if="row.lastResult === 'Success'" :value="'Pass'"/>
<status-table-item v-if="row.lastResult === 'Fail'" :value="'Failure'"/>
</template>
</ms-table-column>
</ms-table>
</el-col>
<el-col :span="16" v-if="scenarioCases.length > 0">
<ms-api-report :share-id="shareId" :is-share="isShare" :template-report="response" :is-template="isTemplate" :infoDb="true" :report-id="reportId"/>
<ms-api-report v-if="showResponse" :share-id="shareId" :is-share="isShare" :template-report="response" :is-template="isTemplate" :infoDb="true" :report-id="reportId"/>
</el-col>
</el-row>
</div>
@ -56,7 +59,12 @@ import PriorityTableItem from "../../../../../../common/tableItems/planview/Prio
import TypeTableItem from "../../../../../../common/tableItems/planview/TypeTableItem";
import MethodTableItem from "../../../../../../common/tableItems/planview/MethodTableItem";
import StatusTableItem from "../../../../../../common/tableItems/planview/StatusTableItem";
import {getPlanScenarioFailureCase, getSharePlanScenarioFailureCase} from "@/network/test-plan";
import {
getPlanScenarioAllCase,
getPlanScenarioFailureCase,
getSharePlanScenarioAllCase,
getSharePlanScenarioFailureCase
} from "@/network/test-plan";
import MsTable from "@/business/components/common/components/table/MsTable";
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
import MsApiReport from "@/business/components/api/automation/report/ApiReportDetail";
@ -70,14 +78,16 @@ export default {
isTemplate: Boolean,
report: Object,
isShare: Boolean,
shareId: String
shareId: String,
isAll: Boolean
},
data() {
return {
scenarioCases: [],
result: {},
reportId: null,
response: {}
response: {},
showResponse: true
}
},
mounted() {
@ -86,31 +96,58 @@ export default {
methods: {
getScenarioApiCase() {
if (this.isTemplate) {
this.scenarioCases = this.report.scenarioFailureResult;
if (this.scenarioCases && this.scenarioCases.length > 0) {
this.rowClick(this.scenarioCases[0]);
if (this.isAll) {
this.scenarioCases = this.report.scenarioAllCases;
} else {
this.scenarioCases = this.report.scenarioFailureResult;
}
this.handleDefaultClick();
} else if (this.isShare) {
this.result = getSharePlanScenarioFailureCase(this.shareId, this.planId, (data) => {
this.scenarioCases = data;
if (data && data.length > 0) {
this.reportId = data[0].reportId;
}
});
if (this.isAll) {
this.result = getSharePlanScenarioAllCase(this.shareId, this.planId, (data) => {
this.scenarioCases = data;
this.handleDefaultClick();
});
} else {
this.result = getSharePlanScenarioFailureCase(this.shareId, this.planId, (data) => {
this.scenarioCases = data;
this.handleDefaultClick();
});
}
} else {
this.result = getPlanScenarioFailureCase(this.planId, (data) => {
this.scenarioCases = data;
if (data && data.length > 0) {
this.reportId = data[0].reportId;
}
});
if (this.isAll) {
this.result = getPlanScenarioAllCase(this.planId, (data) => {
this.scenarioCases = data;
this.handleDefaultClick();
});
} else {
this.result = getPlanScenarioFailureCase(this.planId, (data) => {
this.scenarioCases = data;
this.handleDefaultClick();
});
}
}
},
handleDefaultClick() {
let data = this.scenarioCases;
if (data && data.length > 0) {
this.rowClick(data[0]);
}
},
rowClick(row) {
this.showResponse = true;
if (this.isTemplate) {
this.response = row.response;
if (!row.response) {
this.showResponse = false;
} else {
this.response = row.response;
}
} else {
this.reportId = row.reportId;
if (!row.reportId) {
this.showResponse = false;
} else {
this.reportId = row.reportId;
}
}
}
}

View File

@ -2,7 +2,7 @@
<div class="container">
<el-table
row-key="id"
:data="failureTestCases">
:data="testCases">
<el-table-column
prop="num"
:label="$t('commons.id')"
@ -47,7 +47,7 @@
column-key="status"
:label="$t('test_track.plan_view.execute_result')">
<template v-slot:default="scope">
<status-table-item :value="'Failure'"/>
<status-table-item :value="scope.row.status"/>
</template>
</el-table-column>
@ -69,37 +69,59 @@ import PriorityTableItem from "../../../../../../common/tableItems/planview/Prio
import TypeTableItem from "../../../../../../common/tableItems/planview/TypeTableItem";
import MethodTableItem from "../../../../../../common/tableItems/planview/MethodTableItem";
import StatusTableItem from "../../../../../../common/tableItems/planview/StatusTableItem";
import {getPlanFunctionFailureCase, getSharePlanFunctionFailureCase} from "@/network/test-plan";
import {
getPlanFunctionAllCase,
getPlanFunctionFailureCase,
getSharePlanFunctionAllCase,
getSharePlanFunctionFailureCase
} from "@/network/test-plan";
export default {
name: "FunctionalFailureResult",
name: "FunctionalCases",
components: {StatusTableItem, MethodTableItem, TypeTableItem, PriorityTableItem},
props: {
planId: String,
isTemplate: Boolean,
isShare: Boolean,
report: {},
shareId: String
shareId: String,
isAll: Boolean
},
data() {
return {
failureTestCases: []
testCases: []
}
},
mounted() {
this.getFailureTestCase();
this.getFunctionalTestCase();
},
methods: {
getFailureTestCase() {
getFunctionalTestCase() {
if (this.isTemplate) {
this.failureTestCases = this.report.functionFailureCases;
if (this.isAll) {
this.testCases = this.report.functionAllCases;
} else {
this.testCases = this.report.functionFailureCases;
}
} else if (this.isShare) {
getSharePlanFunctionFailureCase(this.shareId, this.planId, (data) => {
this.failureTestCases = data;
});
if (this.isAll) {
getSharePlanFunctionAllCase(this.shareId, this.planId, (data) => {
this.testCases = data;
});
} else {
getSharePlanFunctionFailureCase(this.shareId, this.planId, (data) => {
this.testCases = data;
});
}
} else {
getPlanFunctionFailureCase(this.planId, (data) => {
this.failureTestCases = data;
});
if (this.isAll) {
getPlanFunctionAllCase(this.planId, (data) => {
this.testCases = data;
});
} else {
getPlanFunctionFailureCase(this.planId, (data) => {
this.testCases = data;
});
}
}
}
}

View File

@ -0,0 +1,89 @@
<template>
<div class="container">
<el-row class="scenario-info">
<el-col :span="7">
<load-failure-result @rowClick="getReport" :is-all="true" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
</el-col>
<el-col :span="17" >
<el-card>
<load-case-report-view :is-plan-report="true" :share-id="shareId" :is-share="isShare"
:plan-report-template="response" v-if="showResponse" :report-id="reportId" ref="loadCaseReportView"/>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import TypeTableItem from "../../../../../../common/tableItems/planview/TypeTableItem";
import MethodTableItem from "../../../../../../common/tableItems/planview/MethodTableItem";
import StatusTableItem from "../../../../../../common/tableItems/planview/StatusTableItem";
import {checkoutLoadReport, shareCheckoutLoadReport} from "@/network/test-plan";
import LoadFailureResult
from "@/business/components/track/plan/view/comonents/report/detail/component/LoadFailureResult";
import LoadCaseReport from "@/business/components/track/plan/view/comonents/load/LoadCaseReport";
import LoadCaseReportView from "@/business/components/track/plan/view/comonents/load/LoadCaseReportView";
export default {
name: "LoadAllResult",
components: {LoadCaseReportView, LoadCaseReport, LoadFailureResult, StatusTableItem, MethodTableItem, TypeTableItem},
props: {
planId: String,
report: Object,
isTemplate: Boolean,
isShare: Boolean,
shareId: String
},
data() {
return {
failureTestCases: [],
showResponse: true,
reportId: "",
response: null
}
},
mounted() {
},
methods: {
getReport(row) {
this.showResponse = true;
if (this.isTemplate) {
if (!row.response) {
this.showResponse = false;
} else {
this.response = row.response;
}
} else {
let param = {
testPlanLoadCaseId: row.id,
reportId: row.loadReportId
}
if (!row.loadReportId) {
this.showResponse = false;
return;
}
if (this.isShare) {
shareCheckoutLoadReport(this.shareId, param, data => {
this.openReport(data, row.loadReportId);
});
} else {
checkoutLoadReport(param, data => {
this.openReport(data, row.loadReportId);
});
}
}
},
openReport(exist, loadReportId) {
if (exist) {
this.reportId = loadReportId;
} else {
this.showResponse = false;
this.$warning(this.$t('test_track.plan.load_case.report_not_found'));
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -2,7 +2,9 @@
<div class="container">
<el-table
row-key="id"
:data="failureTestCases">
@row-click="rowClick"
:highlight-current-row="true"
:data="loadTestCases">
<el-table-column
prop="num"
:label="$t('commons.id')"
@ -26,9 +28,18 @@
prop="status"
column-key="status"
:label="$t('test_track.plan_view.execute_result')">
<template v-slot:default="scope">
<status-table-item :value="'Failure'"/>
</template>
<template v-slot:default="{row}">
<el-tag size="mini" type="danger" v-if="row.status === 'error'">
{{ row.status }}
</el-tag>
<el-tag size="mini" type="success" v-else-if="row.status === 'success'">
{{ row.status }}
</el-tag>
<el-tag size="mini" v-else-if="row.status === 'run'">
{{ row.status }}
</el-tag>
<span v-else>-</span>
</template>
</el-table-column>
</el-table>
@ -40,7 +51,12 @@
import TypeTableItem from "../../../../../../common/tableItems/planview/TypeTableItem";
import MethodTableItem from "../../../../../../common/tableItems/planview/MethodTableItem";
import StatusTableItem from "../../../../../../common/tableItems/planview/StatusTableItem";
import {getPlanLoadFailureCase, getSharePlanLoadFailureCase} from "@/network/test-plan";
import {
getPlanLoadAllCase,
getPlanLoadFailureCase,
getSharePlanLoadAllCase,
getSharePlanLoadFailureCase
} from "@/network/test-plan";
export default {
name: "LoadFailureResult",
components: {StatusTableItem, MethodTableItem, TypeTableItem},
@ -49,11 +65,12 @@ export default {
report: Object,
isTemplate: Boolean,
isShare: Boolean,
shareId: String
shareId: String,
isAll: Boolean
},
data() {
return {
failureTestCases: []
loadTestCases: []
}
},
mounted() {
@ -62,15 +79,42 @@ export default {
methods: {
getFailureTestCase() {
if (this.isTemplate) {
this.failureTestCases = this.report.loadFailureTestCases;
if (this.isAll) {
this.loadTestCases = this.report.loadAllTestCases;
} else {
this.loadTestCases = this.report.loadFailureTestCases;
}
} else if (this.isShare) {
getSharePlanLoadFailureCase(this.shareId, this.planId, (data) => {
this.failureTestCases = data;
});
if (this.isAll) {
getSharePlanLoadAllCase(this.shareId, this.planId, (data) => {
this.loadTestCases = data;
});
} else {
getSharePlanLoadFailureCase(this.shareId, this.planId, (data) => {
this.loadTestCases = data;
});
}
} else {
getPlanLoadFailureCase(this.planId, (data) => {
this.failureTestCases = data;
});
if (this.isAll) {
getPlanLoadAllCase(this.planId, (data) => {
this.loadTestCases = data;
});
} else {
getPlanLoadFailureCase(this.planId, (data) => {
this.loadTestCases = data;
});
}
}
},
handleDefaultClick() {
let data = this.scenarioCases;
if (data && data.length > 0) {
this.rowClick(data[0]);
}
},
rowClick(row) {
if (this.isAll) {
this.$emit('rowClick', row);
}
}
}

View File

@ -1,17 +1,17 @@
import {get, post} from "@/common/js/ajax";
export function baseGet(url, callback) {
return get(url, (response) => {
return get(url, callback ? (response) => {
if (callback) {
callback(response.data);
}
});
} : callback);
}
export function basePost(url, param, callback) {
return post(url, param, (response) => {
return post(url, param, callback ? (response) => {
if (callback) {
callback(response.data);
}
});
} : callback);
}

View File

@ -0,0 +1,29 @@
import {baseGet} from "@/network/base-network";
export function getPerformanceReport(reportId, callback) {
return reportId ? baseGet('/performance/report/' + reportId, callback) : {};
}
export function getSharePerformanceReport(shareId, reportId, callback) {
return reportId ? baseGet('/share/performance/report/' + shareId + '/' + reportId, callback) : {};
}
export function getPerformanceReportTime(reportId, callback) {
return reportId ? baseGet('/performance/report/content/report_time/' + reportId, callback) : {};
}
export function getSharePerformanceReportTime(shareId, reportId, callback) {
return reportId ? baseGet('/share/performance/report/content/report_time/' + shareId + '/' + reportId, callback) : {};
}
export function getPerformanceLoadConfig(reportId, callback) {
return reportId ? baseGet('/performance/report/get-load-config/' + reportId, callback) : {};
}
export function getSharePerformanceLoadConfig(shareId, reportId, callback) {
return reportId ? baseGet('/share/performance/report/get-load-config/' + shareId + '/' + reportId, callback) : {};
}
export function getPerformanceJmxContent(reportId, callback) {
return reportId ? baseGet('/performance/report/get-jmx-content/' + reportId, callback) : {};
}
export function getSharePerformanceJmxContent(shareId, reportId, callback) {
return reportId ? baseGet('/share/performance/report/get-jmx-content/' + shareId + '/' + reportId, callback) : {};
}

View File

@ -42,30 +42,72 @@ export function getPlanFunctionFailureCase(planId, callback) {
return planId ? baseGet('/test/plan/case/list/failure/' + planId, callback) : {};
}
export function getPlanFunctionAllCase(planId, callback) {
return planId ? baseGet('/test/plan/case/list/all/' + planId, callback) : {};
}
export function getSharePlanFunctionFailureCase(shareId, planId, callback) {
return planId ? baseGet('/share/test/plan/case/list/failure/' + shareId + '/' + planId, callback) : {};
}
export function getSharePlanFunctionAllCase(shareId, planId, callback) {
return planId ? baseGet('/share/test/plan/case/list/all/' + shareId + '/' + planId, callback) : {};
}
export function getPlanScenarioFailureCase(planId, callback) {
return planId ? baseGet('/test/plan/scenario/case/list/failure/' + planId, callback) : {};
}
export function getPlanScenarioAllCase(planId, callback) {
return planId ? baseGet('/test/plan/scenario/case/list/all/' + planId, callback) : {};
}
export function getSharePlanScenarioFailureCase(shareId, planId, callback) {
return planId ? baseGet('/share/test/plan/scenario/case/list/failure/' + shareId + '/' + planId, callback) : {};
}
export function getSharePlanScenarioAllCase(shareId, planId, callback) {
return planId ? baseGet('/share/test/plan/scenario/case/list/all/' + shareId + '/' + planId, callback) : {};
}
export function getPlanApiFailureCase(planId, callback) {
return planId ? baseGet('/test/plan/api/case/list/failure/' + planId, callback) : {};
}
export function getPlanApiAllCase(planId, callback) {
return planId ? baseGet('/test/plan/api/case/list/all/' + planId, callback) : {};
}
export function getSharePlanApiFailureCase(shareId, planId, callback) {
return planId ? baseGet('/share/test/plan/api/case/list/failure/' + shareId + '/' + planId, callback) : {};
}
export function getSharePlanApiAllCase(shareId, planId, callback) {
return planId ? baseGet('/share/test/plan/api/case/list/all/' + shareId + '/' + planId, callback) : {};
}
export function getPlanLoadFailureCase(planId, callback) {
return planId ? baseGet('/test/plan/load/case/list/failure/' + planId, callback) : {};
}
export function getPlanLoadAllCase(planId, callback) {
return planId ? baseGet('/test/plan/load/case/list/all/' + planId, callback) : {};
}
export function getSharePlanLoadFailureCase(shareId, planId, callback) {
return planId ? baseGet('/share/test/plan/load/case/list/failure/' + shareId + '/' + planId, callback) : {};
}
export function getSharePlanLoadAllCase(shareId, planId, callback) {
return planId ? baseGet('/share/test/plan/load/case/list/all/' + shareId + '/' + planId, callback) : {};
}
export function checkoutLoadReport(param, callback) {
return basePost('/test/plan/load/case/report/exist', param, callback);
}
export function shareCheckoutLoadReport(shareId, param, callback) {
return basePost('/share/test/plan/load/case/report/exist/' + shareId, param, callback);
}