fix(测试跟踪): 测试计划失败用例TOP10统计批量执行失败的用例
--bug=1020237 --user=宋昌昌 【测试跟踪】首页-过去7天测试计划失败用例TOP 10-失败次数没统计批量执行失败的用例 https://www.tapd.cn/55049933/s/1304585
This commit is contained in:
parent
61926434ae
commit
3a977e134b
|
@ -138,8 +138,12 @@ public class ApiDefinitionExecResultService {
|
|||
for (RequestResult item : dto.getRequestResults()) {
|
||||
if (!StringUtils.startsWithAny(item.getName(), "PRE_PROCESSOR_ENV_", "POST_PROCESSOR_ENV_")) {
|
||||
ApiDefinitionExecResult result = this.editResult(item, dto.getReportId(), dto.getConsole(), dto.getRunMode(), dto.getTestId(), definitionExecResultMapper);
|
||||
// 批量更新关联关系状态
|
||||
batchEditStatus(dto.getRunMode(), result.getStatus(), result.getId(), dto.getTestId(), batchApiTestCaseMapper);
|
||||
if (result != null) {
|
||||
result.setResourceId(dto.getTestId());
|
||||
apiExecutionInfoService.insertExecutionInfo(result);
|
||||
// 批量更新关联关系状态
|
||||
batchEditStatus(dto.getRunMode(), result.getStatus(), result.getId(), dto.getTestId(), batchApiTestCaseMapper);
|
||||
}
|
||||
if (result != null && !StringUtils.startsWithAny(dto.getRunMode(), "SCHEDULE")) {
|
||||
User user = null;
|
||||
if (MapUtils.isNotEmpty(dto.getExtendedParameters()) && dto.getExtendedParameters().containsKey("user") && dto.getExtendedParameters().get("user") instanceof User) {
|
||||
|
|
|
@ -236,7 +236,13 @@ public class TestPlanTestCaseService {
|
|||
testPlanTestCaseMapper.updateByExampleSelective(
|
||||
testPlanTestCase,
|
||||
testPlanTestCaseExample);
|
||||
|
||||
if (StringUtils.isNotBlank(testPlanTestCase.getStatus()) &&
|
||||
!StringUtils.equals(TestPlanTestCaseStatus.Prepare.name(), testPlanTestCase.getStatus())) {
|
||||
//记录功能用例执行信息
|
||||
request.getIds().forEach(caseId -> {
|
||||
functionCaseExecutionInfoService.insertExecutionInfo(caseId, testPlanTestCase.getStatus());
|
||||
});
|
||||
}
|
||||
if (StringUtils.isNotBlank(request.getStatus())) {
|
||||
List<String> caseIds = extTestPlanTestCaseMapper.getCaseIdsByIds(request.getIds());
|
||||
testCaseService.updateLastExecuteStatus(caseIds, request.getStatus());
|
||||
|
|
Loading…
Reference in New Issue