fix(测试计划): 修复测试计划报表点击未执行的报表会报错的问题
--bug=1008134 --user=宋天阳 【github#7888】点开执行中的测试计划日志,展示的是之前的旧数据 https://www.tapd.cn/55049933/s/1072863
This commit is contained in:
parent
6d82bdfd51
commit
fe21f93730
|
@ -729,13 +729,13 @@ public class TestPlanApiCaseService {
|
|||
String reportId = testPlanApiCaseReportMap.get(testPlanApiCaseId);
|
||||
dto.setReportId(reportId);
|
||||
if(StringUtils.isEmpty(reportId)){
|
||||
dto.setStatus(defaultStatus);
|
||||
dto.setExecResult(defaultStatus);
|
||||
}else {
|
||||
String status = reportResult.get(reportId);
|
||||
if(status == null){
|
||||
status = defaultStatus;
|
||||
}
|
||||
dto.setStatus(status);
|
||||
dto.setExecResult(status);
|
||||
}
|
||||
}
|
||||
return buildCases(apiTestCases);
|
||||
|
|
|
@ -467,7 +467,7 @@ public class TestPlanScenarioCaseService {
|
|||
if(status == null ){
|
||||
status = defaultStatus;
|
||||
}
|
||||
dto.setStatus(status);
|
||||
dto.setLastResult(status);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1706,7 +1706,6 @@ public class TestPlanService {
|
|||
if (MapUtils.isEmpty(executeInfo.getApiCaseExecInfo()) && MapUtils.isEmpty(executeInfo.getApiScenarioCaseExecInfo())) {
|
||||
return;
|
||||
}
|
||||
ApiDefinitionExecResultMapper apiDefinitionExecResultMapper = CommonBeanFactory.getBean(ApiDefinitionExecResultMapper.class);
|
||||
if (checkReportConfig(config, "api")) {
|
||||
List<TestPlanFailureApiDTO> apiAllCases = null;
|
||||
List<TestPlanFailureScenarioDTO> scenarioAllCases = null;
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
<template v-slot:default="scope">
|
||||
<status-table-item v-if="scope.row.execResult === 'success'" :value="'Pass'"/>
|
||||
<status-table-item v-if="scope.row.execResult === 'error'" :value="'Failure'"/>
|
||||
<status-table-item v-if="scope.row.execResult != 'error' && scope.row.execResult != 'success'" :value="'Prepare'"/>
|
||||
<status-table-item v-if="scope.row.execResult != 'error' && scope.row.execResult != 'success'"
|
||||
:value="'Prepare'"/>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
</ms-table>
|
||||
|
@ -76,11 +77,13 @@ import MsTable from "@/business/components/common/components/table/MsTable";
|
|||
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
||||
import {getApiReport, getShareApiReport} from "@/network/api";
|
||||
import MsRequestResultTail from "@/business/components/api/definition/components/response/RequestResultTail";
|
||||
|
||||
export default {
|
||||
name: "ApiCaseFailureResult",
|
||||
components: {
|
||||
MsRequestResultTail,
|
||||
MsTableColumn, MsTable, StatusTableItem, MethodTableItem, TypeTableItem, PriorityTableItem},
|
||||
MsTableColumn, MsTable, StatusTableItem, MethodTableItem, TypeTableItem, PriorityTableItem
|
||||
},
|
||||
props: {
|
||||
planId: String,
|
||||
isTemplate: Boolean,
|
||||
|
@ -162,7 +165,11 @@ export default {
|
|||
let data = response.data;
|
||||
if (data && data.content) {
|
||||
this.showResponse = true;
|
||||
try {
|
||||
this.response = JSON.parse(data.content);
|
||||
} catch (e) {
|
||||
this.response = {};
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue