parent
0481b88302
commit
1ec1579f9e
|
@ -78,8 +78,6 @@ import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static io.metersphere.service.ServiceUtils.buildVersionInfo;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public class TestCaseService {
|
public class TestCaseService {
|
||||||
|
@ -114,8 +112,8 @@ public class TestCaseService {
|
||||||
@Resource
|
@Resource
|
||||||
TestCaseNodeService testCaseNodeService;
|
TestCaseNodeService testCaseNodeService;
|
||||||
|
|
||||||
// @Resource
|
// @Resource
|
||||||
// ApiTestCaseMapper apiTestCaseMapper;
|
// ApiTestCaseMapper apiTestCaseMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
TestCaseIssueService testCaseIssueService;
|
TestCaseIssueService testCaseIssueService;
|
||||||
|
@ -132,9 +130,9 @@ public class TestCaseService {
|
||||||
@Resource
|
@Resource
|
||||||
AttachmentModuleRelationMapper attachmentModuleRelationMapper;
|
AttachmentModuleRelationMapper attachmentModuleRelationMapper;
|
||||||
// @Resource
|
// @Resource
|
||||||
// private LoadTestMapper loadTestMapper;
|
// private LoadTestMapper loadTestMapper;
|
||||||
// @Resource
|
// @Resource
|
||||||
// private ApiScenarioMapper apiScenarioMapper;
|
// private ApiScenarioMapper apiScenarioMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private TestCaseIssuesMapper testCaseIssuesMapper;
|
private TestCaseIssuesMapper testCaseIssuesMapper;
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -146,19 +144,19 @@ public class TestCaseService {
|
||||||
@Resource
|
@Resource
|
||||||
private RelevanceLoadCaseService relevanceLoadCaseService;
|
private RelevanceLoadCaseService relevanceLoadCaseService;
|
||||||
// @Resource
|
// @Resource
|
||||||
// @Lazy
|
// @Lazy
|
||||||
// private ApiTestCaseService apiTestCaseService;
|
// private ApiTestCaseService apiTestCaseService;
|
||||||
// @Resource
|
// @Resource
|
||||||
// @Lazy
|
// @Lazy
|
||||||
// private ApiAutomationService apiAutomationService;
|
// private ApiAutomationService apiAutomationService;
|
||||||
// @Resource
|
// @Resource
|
||||||
// @Lazy
|
// @Lazy
|
||||||
// private PerformanceTestService performanceTestService;
|
// private PerformanceTestService performanceTestService;
|
||||||
@Resource
|
@Resource
|
||||||
private TestCaseFollowMapper testCaseFollowMapper;
|
private TestCaseFollowMapper testCaseFollowMapper;
|
||||||
// @Resource
|
// @Resource
|
||||||
// @Lazy
|
// @Lazy
|
||||||
// private TestPlanService testPlanService;
|
// private TestPlanService testPlanService;
|
||||||
@Resource
|
@Resource
|
||||||
private MinderExtraNodeService minderExtraNodeService;
|
private MinderExtraNodeService minderExtraNodeService;
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -894,9 +892,9 @@ public class TestCaseService {
|
||||||
order.setPrefix("test_case");
|
order.setPrefix("test_case");
|
||||||
});
|
});
|
||||||
// todo
|
// todo
|
||||||
// if (testPlanService.isAllowedRepeatCase(request.getPlanId())) {
|
// if (testPlanService.isAllowedRepeatCase(request.getPlanId())) {
|
||||||
// request.setRepeatCase(true);
|
// request.setRepeatCase(true);
|
||||||
// }
|
// }
|
||||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||||
return PageUtils.setPageInfo(page, getTestCaseByNotInPlan(request));
|
return PageUtils.setPageInfo(page, getTestCaseByNotInPlan(request));
|
||||||
}
|
}
|
||||||
|
@ -2537,23 +2535,23 @@ public class TestCaseService {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public List<ApiTestCaseDTO> getTestCaseApiCaseRelateList(ApiTestCaseRequest request) {
|
// public List<ApiTestCaseDTO> getTestCaseApiCaseRelateList(ApiTestCaseRequest request) {
|
||||||
// List<ApiTestCaseDTO> apiTestCaseDTOS = testCaseTestMapper.relevanceApiList(request);
|
// List<ApiTestCaseDTO> apiTestCaseDTOS = testCaseTestMapper.relevanceApiList(request);
|
||||||
// ServiceUtils.buildVersionInfo(apiTestCaseDTOS);
|
// ServiceUtils.buildVersionInfo(apiTestCaseDTOS);
|
||||||
// return apiTestCaseDTOS;
|
// return apiTestCaseDTOS;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// public List<ApiScenarioDTO> getTestCaseScenarioCaseRelateList(ApiScenarioRequest request) {
|
// public List<ApiScenarioDTO> getTestCaseScenarioCaseRelateList(ApiScenarioRequest request) {
|
||||||
// List<ApiScenarioDTO> apiScenarioDTOS = testCaseTestMapper.relevanceScenarioList(request);
|
// List<ApiScenarioDTO> apiScenarioDTOS = testCaseTestMapper.relevanceScenarioList(request);
|
||||||
// ServiceUtils.buildVersionInfo(apiScenarioDTOS);
|
// ServiceUtils.buildVersionInfo(apiScenarioDTOS);
|
||||||
// return apiScenarioDTOS;
|
// return apiScenarioDTOS;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// public List<LoadTestDTO> getTestCaseLoadCaseRelateList(LoadCaseRequest request) {
|
// public List<LoadTestDTO> getTestCaseLoadCaseRelateList(LoadCaseRequest request) {
|
||||||
// List<LoadTestDTO> loadTestDTOS = testCaseTestMapper.relevanceLoadList(request);
|
// List<LoadTestDTO> loadTestDTOS = testCaseTestMapper.relevanceLoadList(request);
|
||||||
// ServiceUtils.buildVersionInfo(loadTestDTOS);
|
// ServiceUtils.buildVersionInfo(loadTestDTOS);
|
||||||
// return loadTestDTOS;
|
// return loadTestDTOS;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public void relateTest(String type, String caseId, List<String> apiIds) {
|
public void relateTest(String type, String caseId, List<String> apiIds) {
|
||||||
apiIds.forEach(testId -> {
|
apiIds.forEach(testId -> {
|
||||||
|
@ -2847,7 +2845,7 @@ public class TestCaseService {
|
||||||
Map<String, String> projectVersionMap = projectVersionService.getProjectVersionByIds(versionIds).stream()
|
Map<String, String> projectVersionMap = projectVersionService.getProjectVersionByIds(versionIds).stream()
|
||||||
.collect(Collectors.toMap(ProjectVersion::getId, ProjectVersion::getName));
|
.collect(Collectors.toMap(ProjectVersion::getId, ProjectVersion::getName));
|
||||||
testCases.forEach(testCase -> {
|
testCases.forEach(testCase -> {
|
||||||
testCase.setVersionName(projectVersionMap.get(testCase.getVersionId()));
|
testCase.setVersionName(projectVersionMap.get(testCase.getVersionId()));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3091,7 +3089,7 @@ public class TestCaseService {
|
||||||
|
|
||||||
public List<TestAnalysisChartResult> countTestCaseByTypeAndRequest(String type, TestAnalysisChartRequest request) {
|
public List<TestAnalysisChartResult> countTestCaseByTypeAndRequest(String type, TestAnalysisChartRequest request) {
|
||||||
if (StringUtils.equalsIgnoreCase(type, "create")) {
|
if (StringUtils.equalsIgnoreCase(type, "create")) {
|
||||||
return extTestAnalysisMapper.getCraeteCaseReport(request);
|
return extTestAnalysisMapper.getCreateCaseReport(request);
|
||||||
} else if (StringUtils.equalsIgnoreCase(type, "update")) {
|
} else if (StringUtils.equalsIgnoreCase(type, "update")) {
|
||||||
return extTestAnalysisMapper.getUpdateCaseReport(request);
|
return extTestAnalysisMapper.getUpdateCaseReport(request);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue