refactor(测试计划): 执行历史
This commit is contained in:
parent
990e6e5ca1
commit
fa35b376f7
|
@ -268,7 +268,7 @@
|
|||
bug_relation_case
|
||||
INNER JOIN bug ON bug.id = bug_relation_case.bug_id
|
||||
WHERE
|
||||
bug_relation_case.case_id IN
|
||||
bug_relation_case.test_plan_case_id IN
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
|
@ -96,7 +96,8 @@
|
|||
test_plan_case_execute_history tpceh
|
||||
left join user u on tpceh.create_user = u.id
|
||||
left join user_extend ux on tpceh.create_user = ux.id
|
||||
left join test_plan tp on tpceh.test_plan_case_id = tp.id
|
||||
left join test_plan_functional_case tpfc on tpceh.test_plan_case_id = tpfc.id
|
||||
left join test_plan tp on tpfc.test_plan_id = tp.id
|
||||
where tpceh.case_id = #{caseId}
|
||||
<if test="planId != null and planId != ''">
|
||||
and tpceh.test_plan_case_id = #{planId}
|
||||
|
|
|
@ -567,7 +567,7 @@ public class FunctionalTestCaseControllerTests extends BaseTest {
|
|||
@Order(13)
|
||||
public void testPlanExecuteHistoryList() throws Exception {
|
||||
TestPlanCaseExecuteHistory testPlanCaseExecuteHistory = new TestPlanCaseExecuteHistory();
|
||||
testPlanCaseExecuteHistory.setTestPlanCaseId("test_plan_associate_case_gyq_two");
|
||||
testPlanCaseExecuteHistory.setTestPlanCaseId("associate_case_plan_gyq_one");
|
||||
testPlanCaseExecuteHistory.setCaseId("gyq_associate_function_case");
|
||||
testPlanCaseExecuteHistory.setCreateUser("admin");
|
||||
testPlanCaseExecuteHistory.setStatus(FunctionalCaseReviewStatus.RE_REVIEWED.toString());
|
||||
|
@ -579,7 +579,7 @@ public class FunctionalTestCaseControllerTests extends BaseTest {
|
|||
List<TestPlanCaseExecuteHistoryDTO> gyqReviewCaseTest = getPlanExecuteHistoryList("gyq_associate_function_case");
|
||||
Assertions.assertTrue(StringUtils.isNotBlank(gyqReviewCaseTest.get(0).getContentText()));
|
||||
testPlanCaseExecuteHistory = new TestPlanCaseExecuteHistory();
|
||||
testPlanCaseExecuteHistory.setTestPlanCaseId("test_plan_associate_case_gyq_two");
|
||||
testPlanCaseExecuteHistory.setTestPlanCaseId("associate_case_plan_gyq_two");
|
||||
testPlanCaseExecuteHistory.setCaseId("gyq_associate_function_case");
|
||||
testPlanCaseExecuteHistory.setCreateUser("admin");
|
||||
testPlanCaseExecuteHistory.setStatus(FunctionalCaseReviewStatus.RE_REVIEWED.toString());
|
||||
|
|
|
@ -175,7 +175,8 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
|
|||
List<String> ids = functionalCaseLists.stream().map(TestPlanCasePageResponse::getCaseId).collect(Collectors.toList());
|
||||
Map<String, List<FunctionalCaseCustomFieldDTO>> collect = functionalCaseService.getCaseCustomFiledMap(ids, projectId);
|
||||
Set<String> userIds = extractUserIds(functionalCaseLists);
|
||||
Map<String, List<CaseRelateBugDTO>> bugListMap = getBugData(ids);
|
||||
List<String> relateIds = functionalCaseLists.stream().map(TestPlanCasePageResponse::getId).collect(Collectors.toList());
|
||||
Map<String, List<CaseRelateBugDTO>> bugListMap = getBugData(relateIds);
|
||||
Map<String, String> userMap = userLoginService.getUserNameMap(new ArrayList<>(userIds));
|
||||
functionalCaseLists.forEach(testPlanCasePageResponse -> {
|
||||
testPlanCasePageResponse.setCustomFields(collect.get(testPlanCasePageResponse.getCaseId()));
|
||||
|
|
Loading…
Reference in New Issue