fix(UI自动化): xpack代码引用

This commit is contained in:
zhangdahai112 2022-09-23 10:22:51 +08:00 committed by zhangdahai112
parent 97d6255265
commit 9f1726f63c
2 changed files with 66 additions and 1 deletions

View File

@ -24,9 +24,9 @@ import io.metersphere.commons.utils.LogUtil;
import io.metersphere.constants.RunModeConstants; import io.metersphere.constants.RunModeConstants;
import io.metersphere.constants.SystemConstants; import io.metersphere.constants.SystemConstants;
import io.metersphere.dto.RequestResult; import io.metersphere.dto.RequestResult;
import io.metersphere.dto.UiCommandResult;
import io.metersphere.service.ProjectService; import io.metersphere.service.ProjectService;
import io.metersphere.utils.LoggerUtil; import io.metersphere.utils.LoggerUtil;
import io.metersphere.xpack.ui.dto.UiCommandResult;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.BooleanUtils;

View File

@ -0,0 +1,65 @@
package io.metersphere.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
@Getter
@Setter
public class UiCommandResult extends RequestResult {
private Boolean isNotStep;
private String processType;
private String id;
private String uiImg;
private String cmdName;
private long time;
private long endTime;
private long startTime;
private boolean success;
private int totalAssertions;
private int passAssertions;
private String body;
private String vars;
private final List<ResponseAssertionResult> assertions = new ArrayList();
private String reportId;
private String combinationImg;
private List<ScreenshotDTO> uiScreenshots;
@Getter
@Setter
public static class ScreenshotDTO{
/**
* 截图名称
*/
private String name;
/**
* 步骤id
*/
private String stepId;
/**
* 截图时间
*/
private Long time;
/**
* 类型
*/
private String type;
/**
* 截图路径
*/
private String path;
}
public void calTime() {
if (this.endTime != 0l && this.startTime != 0l) {
this.time = this.endTime - this.startTime;
}
}
}