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 class TestPlanUtils {
|
||||||
|
|
||||||
public static void buildStatusResultMap(Map<String, TestCaseReportStatusResultDTO> reportStatusResultMap, String result) {
|
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();
|
result = TestPlanTestCaseStatus.Prepare.name();
|
||||||
}
|
}
|
||||||
TestCaseReportStatusResultDTO statusResult = reportStatusResultMap.get(result);
|
TestCaseReportStatusResultDTO statusResult = reportStatusResultMap.get(result);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<test-plan-report-container id="ui" :title="$t('test_track.report.analysis_ui')">
|
<test-plan-report-container id="ui" :title="$t('test_track.report.analysis_ui')">
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane v-if="resultEnable" :label="$t('test_track.report.test_result')" name="first">
|
<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>
|
||||||
<el-tab-pane v-if="failureEnable" name="second">
|
<el-tab-pane v-if="failureEnable" name="second">
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
|
|
|
@ -41,7 +41,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
apiResult: {
|
uiResult: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {
|
return {
|
||||||
|
@ -52,7 +52,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
apiResult() {
|
uiResult() {
|
||||||
this.getCaseCharData();
|
this.getCaseCharData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -62,8 +62,8 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
getCaseCharData() {
|
getCaseCharData() {
|
||||||
let caseCharData = [];
|
let caseCharData = [];
|
||||||
if (this.apiResult.uiScenarioData) {
|
if (this.uiResult.uiScenarioData) {
|
||||||
this.apiResult.uiScenarioData.forEach(item => {
|
this.uiResult.uiScenarioData.forEach(item => {
|
||||||
let data = this.getDataByStatus(item.status);
|
let data = this.getDataByStatus(item.status);
|
||||||
data.value = item.count;
|
data.value = item.count;
|
||||||
caseCharData.push(data);
|
caseCharData.push(data);
|
||||||
|
@ -72,8 +72,8 @@ export default {
|
||||||
this.caseCharData = caseCharData;
|
this.caseCharData = caseCharData;
|
||||||
|
|
||||||
let uiScenarioData = [];
|
let uiScenarioData = [];
|
||||||
if (this.apiResult.uiScenarioData) {
|
if (this.uiResult.uiScenarioData) {
|
||||||
this.apiResult.uiScenarioData.forEach(item => {
|
this.uiResult.uiScenarioData.forEach(item => {
|
||||||
let data = this.getDataByStatus(item.status);
|
let data = this.getDataByStatus(item.status);
|
||||||
data.value = item.count;
|
data.value = item.count;
|
||||||
uiScenarioData.push(data);
|
uiScenarioData.push(data);
|
||||||
|
@ -81,8 +81,8 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
let stepCharData = [];
|
let stepCharData = [];
|
||||||
for (let i = 0; i < this.apiResult.uiScenarioStepData.length; i++) {
|
for (let i = 0; i < this.uiResult.uiScenarioStepData.length; i++) {
|
||||||
let stepItem = this.apiResult.uiScenarioStepData[i];
|
let stepItem = this.uiResult.uiScenarioStepData[i];
|
||||||
let data = this.getDataByStatus(stepItem.status);
|
let data = this.getDataByStatus(stepItem.status);
|
||||||
data.value = stepItem.count;
|
data.value = stepItem.count;
|
||||||
stepCharData.push(data);
|
stepCharData.push(data);
|
||||||
|
|
|
@ -41,7 +41,8 @@
|
||||||
:label="$t('test_track.plan_view.execute_result')"
|
:label="$t('test_track.plan_view.execute_result')"
|
||||||
prop="lastResult">
|
prop="lastResult">
|
||||||
<template v-slot:default="{row}">
|
<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>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
</ms-table>
|
</ms-table>
|
||||||
|
@ -108,7 +109,7 @@ export default {
|
||||||
'Error' : 'Failure',
|
'Error' : 'Failure',
|
||||||
'STOP' : 'STOP',
|
'STOP' : 'STOP',
|
||||||
'Running' : 'Running',
|
'Running' : 'Running',
|
||||||
'UnExecute' : 'Prepare'
|
'UnExecute' : 'Prepare',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue