fix(接口测试): 修复等待时间显示在未执行的缺陷
--bug=1027292 --user=王孝刚 【接口测试】场景列表-生成报告-步骤统计-等待控制器统计到了未执行中 https://www.tapd.cn/55049933/s/1385447
This commit is contained in:
parent
d24f607960
commit
66c0ccfbb6
|
@ -108,7 +108,7 @@ public class ApiDefinitionController {
|
|||
|
||||
|
||||
@PostMapping(value = "/create", consumes = {"multipart/form-data"})
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_CREATE_API)
|
||||
@RequiresPermissions(value= {PermissionConstants.PROJECT_API_DEFINITION_READ_CREATE_API, PermissionConstants.PROJECT_API_DEFINITION_READ_COPY_API}, logical = Logical.OR)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request.id)", msClass = ApiDefinitionService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.CREATE, subject = "接口定义通知")
|
||||
public ApiDefinitionResult create(@RequestPart("request") SaveApiDefinitionRequest request, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) {
|
||||
|
|
|
@ -115,7 +115,7 @@ public class ApiTestCaseController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/create", consumes = {"multipart/form-data"})
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_CREATE_CASE)
|
||||
@RequiresPermissions(value= {PermissionConstants.PROJECT_API_DEFINITION_READ_CREATE_CASE, PermissionConstants.PROJECT_API_DEFINITION_READ_COPY_CASE}, logical = Logical.OR)
|
||||
@MsAuditLog(module = OperLogModule.API_DEFINITION_CASE, type = OperLogConstants.CREATE, title = "#request.name", content = "#msClass.getLogDetails(#request)", msClass = ApiTestCaseService.class)
|
||||
@SendNotice(taskType = NoticeConstants.TaskType.API_DEFINITION_TASK, event = NoticeConstants.Event.CASE_CREATE, subject = "接口用例通知")
|
||||
public ApiTestCase create(@RequestPart("request") SaveApiTestCaseRequest request, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) {
|
||||
|
|
|
@ -45,8 +45,10 @@ public class ApiScenarioReportStructureService {
|
|||
ElementConstants.ABS_SAMPLER
|
||||
);
|
||||
private static final List<String> CONTROLS = Arrays.asList(
|
||||
ElementConstants.IF_CONTROLLER
|
||||
);
|
||||
private static final List<String> CONTROL = Arrays.asList(
|
||||
ElementConstants.ASSERTIONS,
|
||||
ElementConstants.IF_CONTROLLER,
|
||||
ElementConstants.CONSTANT_TIMER
|
||||
);
|
||||
private static final String RESOURCE_ID = ElementConstants.RESOURCE_ID;
|
||||
|
@ -262,7 +264,7 @@ public class ApiScenarioReportStructureService {
|
|||
stepError.set(stepError.longValue() + 1);
|
||||
} else if (StringUtils.equalsAnyIgnoreCase(step.getTotalStatus(), ERROR_CODE, ApiReportStatus.FAKE_ERROR.name())) {
|
||||
stepErrorCode.set(stepErrorCode.longValue() + 1);
|
||||
} else if (!StringUtils.equalsIgnoreCase(step.getTotalStatus(), ApiReportStatus.SUCCESS.name())) {
|
||||
} else if (!StringUtils.equalsIgnoreCase(step.getTotalStatus(), ApiReportStatus.SUCCESS.name()) && !CONTROL.contains(step.getType())) {
|
||||
stepUnExecute.set(stepUnExecute.longValue() + 1);
|
||||
unExecSize++;
|
||||
}
|
||||
|
@ -378,7 +380,7 @@ public class ApiScenarioReportStructureService {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isEmpty(dto.getTotalStatus())) {
|
||||
if (StringUtils.isEmpty(dto.getTotalStatus()) && !CONTROL.contains(dto.getType())) {
|
||||
dto.setTotalStatus(ApiReportStatus.PENDING.name());
|
||||
} else if (StringUtils.equalsAnyIgnoreCase(dto.getTotalStatus(), ApiReportStatus.ERROR.name())) {
|
||||
dto.setTotalStatus(ApiReportStatus.ERROR.name());
|
||||
|
|
|
@ -44,7 +44,10 @@
|
|||
<el-dropdown
|
||||
v-else
|
||||
style="margin-left: -15px"
|
||||
v-permission="['PROJECT_API_DEFINITION:READ+EDIT_API']"
|
||||
v-permission="[
|
||||
'PROJECT_API_DEFINITION:READ+EDIT_CASE',
|
||||
'PROJECT_API_DEFINITION:READ+CREATE_CASE',
|
||||
'PROJECT_API_DEFINITION:READ+COPY_CASE']"
|
||||
split-button
|
||||
type="primary"
|
||||
size="small"
|
||||
|
|
Loading…
Reference in New Issue