refactor(测试计划): 脑图查询接口连调

This commit is contained in:
guoyuqi 2024-06-12 14:16:46 +08:00 committed by 刘瑞斌
parent b6aca28506
commit d89b550c50
3 changed files with 8 additions and 5 deletions

View File

@ -33,7 +33,7 @@ public class TestPlanCollectionMinderEditDTO implements Serializable {
@NotBlank(message = "{test_plan_collection.execute_method.not_blank}") @NotBlank(message = "{test_plan_collection.execute_method.not_blank}")
private String executeMethod; private String executeMethod;
@Schema(description = "测试集类型(功能FUNCTIONAL_CASE/接口用例API_CASE/场景SCENARIO_CASE)", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "测试集类型(功能FUNCTIONAL/接口用例API/场景SCENARIO)", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{test_plan_collection_minder_edit.collection_type.not_blank}") @NotBlank(message = "{test_plan_collection_minder_edit.collection_type.not_blank}")
private String collectionType; private String collectionType;
@ -43,7 +43,7 @@ public class TestPlanCollectionMinderEditDTO implements Serializable {
@Schema(description = "是否使用环境组", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "是否使用环境组", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "{test_plan_collection.grouped.not_blank}") @NotNull(message = "{test_plan_collection.grouped.not_blank}")
private Boolean grouped; private Boolean grouped = false;
@Schema(description = "环境ID/环境组ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "环境ID/环境组ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{test_plan_collection.environment_id.not_blank}") @NotBlank(message = "{test_plan_collection.environment_id.not_blank}")

View File

@ -23,7 +23,7 @@ public class TestPlanCollectionMinderTreeNodeDTO {
private int num; private int num;
@Schema(description = "串并行") @Schema(description = "串并行")
private int priority; private Integer priority;
@Schema(description = "串并行值") @Schema(description = "串并行值")
private String executeMethod; private String executeMethod;
@ -41,7 +41,7 @@ public class TestPlanCollectionMinderTreeNodeDTO {
private Boolean extended; private Boolean extended;
@Schema(description = "是否使用环境组", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "是否使用环境组", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean grouped; private Boolean grouped = false;
@Schema(description = "环境ID/环境组ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "环境ID/环境组ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String environmentId; private String environmentId;

View File

@ -104,6 +104,9 @@ public class TestPlanCollectionMinderService {
} else { } else {
typeTreeNodeDTO.setPriority(3); typeTreeNodeDTO.setPriority(3);
} }
if (StringUtils.equalsIgnoreCase(CaseType.FUNCTIONAL_CASE.getKey(),testPlanCollection.getType())) {
typeTreeNodeDTO.setPriority(null);
}
return typeTreeNodeDTO; return typeTreeNodeDTO;
} }
@ -209,7 +212,7 @@ public class TestPlanCollectionMinderService {
buildChild(countTreeNodeDTO, count + Translator.get("test_plan.mind.strip"), "test_plan.mind.case_count", countTreeDTO, endList); buildChild(countTreeNodeDTO, count + Translator.get("test_plan.mind.strip"), "test_plan.mind.case_count", countTreeDTO, endList);
TestPlanCollectionMinderTreeDTO envTreeDTO = new TestPlanCollectionMinderTreeDTO(); TestPlanCollectionMinderTreeDTO envTreeDTO = new TestPlanCollectionMinderTreeDTO();
TestPlanCollectionMinderTreeNodeDTO envTreeNodeDTO = new TestPlanCollectionMinderTreeNodeDTO(); TestPlanCollectionMinderTreeNodeDTO envTreeNodeDTO = new TestPlanCollectionMinderTreeNodeDTO();
buildChild(envTreeNodeDTO, planCollection.getEnvName(), "test_plan.mind.environment", envTreeDTO, endList); buildChild(envTreeNodeDTO, StringUtils.equalsIgnoreCase(planCollection.getEnvironmentId(),ModuleConstants.ROOT_NODE_PARENT_ID) ? Translator.get("api_report_default_env") : planCollection.getEnvName() , "test_plan.mind.environment", envTreeDTO, endList);
TestPlanCollectionMinderTreeDTO poolTreeDTO = new TestPlanCollectionMinderTreeDTO(); TestPlanCollectionMinderTreeDTO poolTreeDTO = new TestPlanCollectionMinderTreeDTO();
TestPlanCollectionMinderTreeNodeDTO poolTreeNodeDTO = new TestPlanCollectionMinderTreeNodeDTO(); TestPlanCollectionMinderTreeNodeDTO poolTreeNodeDTO = new TestPlanCollectionMinderTreeNodeDTO();
buildChild(poolTreeNodeDTO, planCollection.getPoolName(), "test_plan.mind.test_resource_pool", poolTreeDTO, endList); buildChild(poolTreeNodeDTO, planCollection.getPoolName(), "test_plan.mind.test_resource_pool", poolTreeDTO, endList);