fix(测试计划执行): 修复测试计划执行时任务中心里接口用例信息没保存的缺陷

--bug=1009154 --user=宋天阳 【测试跟踪】测试计划定时任务执行,任务中心没显示接口用例
https://www.tapd.cn/55049933/s/1085348
This commit is contained in:
song-tianyang 2021-12-22 17:35:36 +08:00 committed by song-tianyang
parent f9c5f40bb0
commit 1b3009e693
3 changed files with 7 additions and 3 deletions

View File

@ -346,13 +346,13 @@ public class ApiDefinitionExecResultService {
ApiDefinitionExecResult prevResult = extApiDefinitionExecResultMapper.selectMaxResultByResourceIdAndType(item.getName(), type);
if (prevResult != null) {
prevResult.setContent(null);
apiDefinitionExecResultMapper.updateByPrimaryKeyWithBLOBs(prevResult);
apiDefinitionExecResultMapper.updateByPrimaryKeySelective(prevResult);
}
if (StringUtils.isNotEmpty(saveResult.getTriggerMode()) && saveResult.getTriggerMode().equals("CASE")) {
saveResult.setTriggerMode(TriggerMode.MANUAL.name());
}
apiDefinitionExecResultMapper.updateByPrimaryKeyWithBLOBs(saveResult);
apiDefinitionExecResultMapper.updateByPrimaryKeySelective(saveResult);
return saveResult;
}
return null;

View File

@ -1120,8 +1120,8 @@ public class TestPlanService {
testPlanLoadCaseService.update(testPlanLoadCase);
LogUtil.error(e);
}
performaneThreadIDMap.put(performanceRequest.getTestPlanLoadId(), reportId);
if (StringUtils.isNotEmpty(reportId)) {
performaneThreadIDMap.put(performanceRequest.getTestPlanLoadId(), reportId);
executePerformanceIdMap.put(performanceRequest.getTestPlanLoadId(), TestPlanApiExecuteStatus.RUNNING.name());
} else {
executePerformanceIdMap.put(performanceRequest.getTestPlanLoadId(), TestPlanApiExecuteStatus.PREPARE.name());

View File

@ -4,12 +4,16 @@
<el-col>
<div style="font-size: 14px;color: #AAAAAA;float: left">{{ $t('api_report.response_code') }} :</div>
<el-tooltip
v-if="responseResult.responseCode"
:content="responseResult.responseCode"
placement="top">
<div class="node-title" :class="response && response.success ?'ms-req-success':'ms-req-error'">
{{ responseResult && responseResult.responseCode ? responseResult.responseCode : '0' }}
</div>
</el-tooltip>
<div v-else class="node-title" :class="response && response.success ?'ms-req-success':'ms-req-error'">
{{ responseResult && responseResult.responseCode ? responseResult.responseCode : '0' }}
</div>
</el-col>
<el-col>
<div style="font-size: 14px;color: #AAAAAA;float: left">{{ $t('api_report.response_time') }} :</div>