fix(用例管理): 增加覆盖率

--bug=1045255 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001045255
This commit is contained in:
guoyuqi 2024-08-19 16:04:28 +08:00 committed by 刘瑞斌
parent 07a20305ac
commit 973d9ddb9a
3 changed files with 13 additions and 1 deletions

View File

@ -403,7 +403,7 @@ public class XMindCaseParser {
*/
private String getSteps(List<Attached> attacheds, String caseName) {
List<FunctionalCaseStepDTO> functionalCaseStepDTOS = new ArrayList<>();
if (!attacheds.isEmpty()) {
if (attacheds!=null && !attacheds.isEmpty()) {
for (int i = 0; i < attacheds.size(); i++) {
// 保持插入顺序判断用例是否有相同的steps
FunctionalCaseStepDTO functionalCaseStepDTO = new FunctionalCaseStepDTO();

View File

@ -407,6 +407,14 @@ public class FunctionalCaseControllerTests extends BaseTest {
paramMap.add("request", JSON.toJSONString(editRequest));
paramMap.add("files", files);
this.requestMultipart(FUNCTIONAL_CASE_UPDATE_URL, paramMap);
editRequest.setExpectedResult("adfadsasfdf");
editRequest.setPrerequisite("adfadsasfdf");
editRequest.setDescription("adfadsasfdf");
paramMap = new LinkedMultiValueMap<>();
paramMap.add("request", JSON.toJSONString(editRequest));
paramMap.add("files", files);
this.requestMultipart(FUNCTIONAL_CASE_UPDATE_URL, paramMap);
}
private List<CaseCustomFieldDTO> updateCustomFields(FunctionalCaseEditRequest editRequest) {

View File

@ -58,6 +58,10 @@ public class NoticeTemplateControllerTests extends BaseTest {
typeList.add(NoticeConstants.TaskType.BUG_TASK);
typeList.add(NoticeConstants.TaskType.JENKINS_TASK);
typeList.add(NoticeConstants.TaskType.SCHEDULE_TASK);
typeList.add(NoticeConstants.TaskType.API_REPORT_TASK);
typeList.add(NoticeConstants.TaskType.BUG_SYNC_TASK);
}
@Test