fix(UI 自动化): 关联未执行的ui场景查看实时报告不展示测试结果数据
--bug=1015635 --user=张大海 【UI 测试】关联未执行的ui场景查看实时报告不展示测试结果数据 https://www.tapd.cn/55049933/s/1218043
This commit is contained in:
parent
e9e1e1409d
commit
e82ee7cca7
|
@ -13,7 +13,8 @@ import java.util.Map;
|
|||
public class TestPlanUtils {
|
||||
|
||||
public static void buildStatusResultMap(Map<String, TestCaseReportStatusResultDTO> reportStatusResultMap, String result) {
|
||||
if (StringUtils.isBlank(result)) {
|
||||
// unexecute 存在于 ui 执行结果中
|
||||
if (StringUtils.isBlank(result) || StringUtils.equals("UnExecute", result)) {
|
||||
result = TestPlanTestCaseStatus.Prepare.name();
|
||||
}
|
||||
TestCaseReportStatusResultDTO statusResult = reportStatusResultMap.get(result);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<test-plan-report-container id="ui" :title="$t('test_track.report.analysis_ui')">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane v-if="resultEnable" :label="$t('test_track.report.test_result')" name="first">
|
||||
<ui-result :api-result="report.uiResult"/>
|
||||
<ui-result :ui-result="report.uiResult"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="failureEnable" name="second">
|
||||
<template v-slot:label>
|
||||
|
|
|
@ -41,7 +41,7 @@ export default {
|
|||
}
|
||||
},
|
||||
props: {
|
||||
apiResult: {
|
||||
uiResult: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {
|
||||
|
@ -52,7 +52,7 @@ export default {
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
apiResult() {
|
||||
uiResult() {
|
||||
this.getCaseCharData();
|
||||
}
|
||||
},
|
||||
|
@ -62,8 +62,8 @@ export default {
|
|||
methods: {
|
||||
getCaseCharData() {
|
||||
let caseCharData = [];
|
||||
if (this.apiResult.uiScenarioData) {
|
||||
this.apiResult.uiScenarioData.forEach(item => {
|
||||
if (this.uiResult.uiScenarioData) {
|
||||
this.uiResult.uiScenarioData.forEach(item => {
|
||||
let data = this.getDataByStatus(item.status);
|
||||
data.value = item.count;
|
||||
caseCharData.push(data);
|
||||
|
@ -72,8 +72,8 @@ export default {
|
|||
this.caseCharData = caseCharData;
|
||||
|
||||
let uiScenarioData = [];
|
||||
if (this.apiResult.uiScenarioData) {
|
||||
this.apiResult.uiScenarioData.forEach(item => {
|
||||
if (this.uiResult.uiScenarioData) {
|
||||
this.uiResult.uiScenarioData.forEach(item => {
|
||||
let data = this.getDataByStatus(item.status);
|
||||
data.value = item.count;
|
||||
uiScenarioData.push(data);
|
||||
|
@ -81,8 +81,8 @@ export default {
|
|||
}
|
||||
|
||||
let stepCharData = [];
|
||||
for (let i = 0; i < this.apiResult.uiScenarioStepData.length; i++) {
|
||||
let stepItem = this.apiResult.uiScenarioStepData[i];
|
||||
for (let i = 0; i < this.uiResult.uiScenarioStepData.length; i++) {
|
||||
let stepItem = this.uiResult.uiScenarioStepData[i];
|
||||
let data = this.getDataByStatus(stepItem.status);
|
||||
data.value = stepItem.count;
|
||||
stepCharData.push(data);
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
:label="$t('test_track.plan_view.execute_result')"
|
||||
prop="lastResult">
|
||||
<template v-slot:default="{row}">
|
||||
<status-table-item :value="resultMap[row.lastResult]"/>
|
||||
<status-table-item v-if="row.lastResult" :value="resultMap[row.lastResult]"/>
|
||||
<status-table-item v-else :value="'Prepare'"/>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
</ms-table>
|
||||
|
@ -108,7 +109,7 @@ export default {
|
|||
'Error' : 'Failure',
|
||||
'STOP' : 'STOP',
|
||||
'Running' : 'Running',
|
||||
'UnExecute' : 'Prepare'
|
||||
'UnExecute' : 'Prepare',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue