mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-30 02:58:31 +08:00
feat(测试跟踪): 模块树支持过滤功能
--story=1010667 --user=张勇 【UI/接口测试】模块树支持过滤功能 https://www.tapd.cn/55049933/s/1316102
This commit is contained in:
parent
ea023e1a32
commit
b7af6738b4
@ -376,8 +376,13 @@ public class TestPlanController {
|
||||
testPlanService.resetStatus(planId);
|
||||
}
|
||||
|
||||
@GetMapping("/ext/report/{planId}")
|
||||
public TestPlanExtReportDTO getExtReport(@PathVariable String planId) throws JsonProcessingException {
|
||||
return testPlanService.getExtReport(planId);
|
||||
@GetMapping("/ext/report/{reportId}")
|
||||
public TestPlanExtReportDTO getExtReport(@PathVariable String reportId) throws JsonProcessingException {
|
||||
return testPlanService.getExtInfoByReportId(reportId);
|
||||
}
|
||||
|
||||
@GetMapping("/ext/plan/{planId}")
|
||||
public TestPlanExtReportDTO getExtPlan(@PathVariable String planId) throws JsonProcessingException {
|
||||
return testPlanService.getExtInfoByPlanId(planId);
|
||||
}
|
||||
}
|
||||
|
@ -1049,7 +1049,7 @@ public class TestPlanReportService {
|
||||
TestPlanService testPlanService = CommonBeanFactory.getBean(TestPlanService.class);
|
||||
TestPlanExtReportDTO extReport = null;
|
||||
try {
|
||||
extReport = testPlanService.getExtReportByReportId(reportId);
|
||||
extReport = testPlanService.getExtInfoByReportId(reportId);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@ -1388,7 +1388,7 @@ public class TestPlanService {
|
||||
public void exportPlanReport(String planId, String lang, HttpServletResponse response) throws UnsupportedEncodingException, JsonProcessingException {
|
||||
TestPlanSimpleReportDTO report = buildPlanReport(planId, true);
|
||||
report.setLang(lang);
|
||||
TestPlanExtReportDTO extReport = getExtReport(planId);
|
||||
TestPlanExtReportDTO extReport = getExtInfoByPlanId(planId);
|
||||
if(extReport != null) {
|
||||
BeanUtils.copyBean(report, extReport);
|
||||
}
|
||||
@ -1397,7 +1397,7 @@ public class TestPlanService {
|
||||
|
||||
public void exportPlanDbReport(String reportId, String lang, HttpServletResponse response) throws UnsupportedEncodingException, JsonProcessingException {
|
||||
TestPlanSimpleReportDTO report = testPlanReportService.getReport(reportId);
|
||||
TestPlanExtReportDTO extReport = getExtReportByReportId(reportId);
|
||||
TestPlanExtReportDTO extReport = getExtInfoByReportId(reportId);
|
||||
if(extReport != null) {
|
||||
BeanUtils.copyBean(report, extReport);
|
||||
}
|
||||
@ -1967,11 +1967,7 @@ public class TestPlanService {
|
||||
this.deleteTestPlans(ids);
|
||||
}
|
||||
|
||||
public TestPlanExtReportDTO getExtReport(String planId) throws JsonProcessingException {
|
||||
String reportId = testPlanReportService.getLastReportByPlanId(planId);
|
||||
if(StringUtils.isEmpty(reportId)){
|
||||
return null;
|
||||
}
|
||||
public TestPlanExtReportDTO getExtInfoByReportId(String reportId) throws JsonProcessingException {
|
||||
TestPlanExtReportDTO testPlanExtReportDTO = new TestPlanExtReportDTO();
|
||||
Set<String> serviceIdSet = DiscoveryUtil.getServiceIdSet();
|
||||
if (serviceIdSet.contains(MicroServiceName.API_TEST)) {
|
||||
@ -1992,7 +1988,7 @@ public class TestPlanService {
|
||||
return testPlanExtReportDTO;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return testPlanExtReportDTO;
|
||||
}
|
||||
|
||||
private void convertEnvConfig(String envConfig, TestPlanExtReportDTO testPlanExtReportDTO) throws JsonProcessingException {
|
||||
@ -2017,7 +2013,11 @@ public class TestPlanService {
|
||||
testPlanExtReportDTO.setResourcePool(testResourcePool == null ? null : testResourcePool.getName());
|
||||
}
|
||||
|
||||
public TestPlanExtReportDTO getExtReportByReportId(String reportId) throws JsonProcessingException {
|
||||
public TestPlanExtReportDTO getExtInfoByPlanId(String planId) throws JsonProcessingException {
|
||||
String reportId = testPlanReportService.getLastReportByPlanId(planId);
|
||||
if(StringUtils.isEmpty(reportId)){
|
||||
return null;
|
||||
}
|
||||
TestPlanExtReportDTO testPlanExtReportDTO = new TestPlanExtReportDTO();
|
||||
Set<String> serviceIdSet = DiscoveryUtil.getServiceIdSet();
|
||||
if (serviceIdSet.contains(MicroServiceName.API_TEST)) {
|
||||
@ -2038,6 +2038,6 @@ public class TestPlanService {
|
||||
return testPlanExtReportDTO;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return testPlanExtReportDTO;
|
||||
}
|
||||
}
|
||||
|
@ -309,9 +309,13 @@ export function testPlanLoadCaseEditStatus(planId) {
|
||||
return post(BASE_URL + `edit/status/${planId}`, new Promise(() => {}));
|
||||
}
|
||||
|
||||
export function getTestPlanExtReport(planId) {
|
||||
if (planId) {
|
||||
return get('/test/plan/ext/report/' + planId);
|
||||
export function getTestPlanExtReport(planId, reportId) {
|
||||
if (reportId) {
|
||||
return get('/test/plan/ext/report/' + reportId);
|
||||
} else if (planId) {
|
||||
return get('/test/plan/ext/plan/' + planId);
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,13 +71,13 @@ export default {
|
||||
isDb: Boolean,
|
||||
shareId: String,
|
||||
reportId: String,
|
||||
runMode: String,
|
||||
resourcePool: String,
|
||||
needMoveBar: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
report: {},
|
||||
runMode: '',
|
||||
resourcePool: '',
|
||||
loading: false,
|
||||
shareUrl: ''
|
||||
};
|
||||
@ -187,8 +187,7 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getTestPlanExtReport(this.planId).then((response) => {
|
||||
getTestPlanExtReport(this.planId, this.reportId).then((response) => {
|
||||
this.runMode = response.data.runMode;
|
||||
this.resourcePool = response.data.resourcePool;
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user